Insert command in sql, PL-SQL Programming

INSERT Command in SQL

Loosely speaking, INSERT takes the rows of a given source table and adds them to the specified target table, retaining all the existing rows in the target.

Example shows how INSERT can be used to add a single row to IS_ENROLLED_ON.

Example: Enrolling a student on a course using INSERT

INSERT INTO IS_ENROLLED_ON VALUES ('S3', 'C2');

Recall that VALUES ('S3', 'C2') denotes the table consisting of just the row ('S3', 'C2'). If that row already exists in the target table, then the update has the effect of increasing the number of appearances of that row by one, unless some key is specified for that table (as is the case with IS_ ENROLLED_ON), in which case the update fails.

Posted Date: 1/18/2013 11:37:00 PM | Location : United States







Related Discussions:- Insert command in sql, Assignment Help, Ask Question on Insert command in sql, Get Answer, Expert's Help, Insert command in sql Discussions

Write discussion on Insert command in sql
Your posts are moderated
Related Questions
Defining and Declaring Records To create records, you have to define a RECORD type, and then declare records of that type. You may also define RECORD types in the declarative

Advantages of Invoker Rights The Invoker-rights routines centralize the data retrieval. They are particularly helpful in applications which store data in various schemas. In su

Many of the reports generated from the system calculate the total dollars in purchases for a shopper. Complete the following steps to create a function named TOT_PURCH_SF that acce

Application to Export Excel Data to MSSQL Server table I am having a table available in excel format and features the subsequent: - Some text is in Arabic (e.g. UTF-8 encodin

Overloading: Similar to packaged subprograms, methods of the same type can be overloaded. That is, you can use similar name for various methods if their formal parameters diff

Cursors   To execute the multi-row query, the Oracle opens an unnamed work region which stores the processing information. The cursor names the work region, access the informa

Using DEFAULT You can use the keyword DEFAULT rather than that of the assignment operator to initialize the variables. For e.g. the declaration blood_type CHAR := ’O’; it can b

Using a join on 3 tables, select 5 columns and 10 rows from the 3 tables without the use of a Cartesian product Query: SELECT E.LAST_NAME, E.FIRST_NAME, S.BUILDING, S.BRAN

Declaring Cursor Variables Once a REF CURSOR type is define by you, and then you can declare the cursor variables of that type in any PL/SQL block or subprogram. In the exampl

Restriction and AND - SQL Restriction is available via the WHERE operator, and so it is in SQL. However, by Example showing how a certain simple restriction can be expressed u