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
Scope and Visibility The References to an identifier are resolved according to its visibility and scope. The scope of an identifier is that area of a program unit (subprogram, b

Tautologies: Above given table allows us to read the truth of the connectives in the next manner. Just expect we are looking at row three. It means this says that, if there P

Fetching from a Cursor Variable The FETCH statement retrieve rows one at a time from the product set of a multi-row query. The syntax for the same is as shown: FETCH {curso

Example of Foreign Key Constraint Example: Alternative formulation for 6.3 as a foreign key constraint ALTER TABLE EXAM_MARK ADD CONSTRAINT Must_be_enrolled_to_take_exam

EXCEPTION_INIT Pragma The pragma EXCEPTION_INIT relates an exception name with an Oracle error number. Which allow you to refer to any internal exception by the name and to wri

Use of Table Expressions - Expressing Constraint Conditions With the exception of key constraints, the examples in the theory book all explicitly reference at least one relvar

Effects of NULL for UNIQUE Specification When a UNIQUE specification u for base table t includes a column c that is not subject to a NOT NULL constraint, the appearance of sev

Variable Declaration - SQL SQL's support for variables is very similar to Tutorial D's, except that the syntax for creating persistent  variables-base tables-is quite differen

Use Native Dynamic SQL A few programs (a normal-purpose report writer for illustration) should build and process a variety of SQL statements at run time. Therefore, their full

FORALL Statement The FORALL statements instruct the PL/SQL engine to bulk-bind the input collections before sending them to the SQL engine. Though the FORALL statement consists