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
Boolean Values Only the values TRUE, FALSE, & NULL can be assigned to a Boolean variable. For illustration, given the declaration DECLARE done BOOLEAN; the following statements

Deleting Objects You can use the DELETE statement to eradicate objects from an object table. To eradicate objects selectively, you use the WHERE clause, as shown below: BEG

Organi c Evolution Evolution is a slow continuous, irreversible and natural process of change to give rise to advance and diverse forms of life i.e. formation of new specie

Using RENAME in combination with JOIN - SQL Example gives pairs of ids of students having the same name, by joining two renamings of IS_CALLED. Example gives an equivalent ex

Advantages of Wrapping   The PL/SQL Wrapper convert the PL/SQL source code into a transitional form of the object code. By hiding the application internals, the Wrapper secure

Parameter and Keyword Description: collection_name: This keyword identifies the index-by table, nested table, or varray formerly declared within the present scope. cu

Using FIRST and LAST FIRST and LAST return the first and last (minimum and maximum) index numbers in a collection. When the collection is empty, the FIRST and LAST return NULL

Data Types in SQL - Integer INTEGER or  synonymously INT, for integers within a certain range. SQL additionally has types SMALLINT and BIGINT for certain ranges of integers. T

Data Types in SQL - Timestamp TIMESTAMP for values representing points in time on a specified uniform scale. DATE is used for timestamps on a scale of one day, such as DATE '2

Providing Results of Queries Expressing queries in SQL is the (big) subject. Here I present just a simple example to give you the flavour of things to come in those chapters.