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
Wrapping and unwrapping in SQL Operators WRAP and UNWRAP in connection with attributes whose declared types are tuple types. Example shows how extension and projection can be

Example of GROUP BY and COLLECT Operator Example: Using GROUP BY and COLLECT to obtain C_ER2 SELECT CourseId, CAST ( COLLECT (ROW (StudentId, Mark)) AS ROW (Studen

Many of the reports generated from the system calculate the total dollars in a shopper''s purchases. Follow these steps to create a function named TOT_PURCH_SF that accepts a shopp

Predefined Exceptions The internal exception is raised implicitly whenever your PL/SQL program exceeds a system-dependent limit or violates an Oracle rule. Each & every Oracle

Forward Declarations The PL/SQL needs that you declare an identifier before using it. And hence, you should declare a subprogram before calling it. For illustration, the decla

What Is a Collection The collection is an ordered group of elements, all of similar type (for e.g. the grades for a class of students). Each element has a unique subscript whic

Example of Using Aggregation on Nested Tables Example: How many students sat each exam WITH C_ER AS (SELECT CourseId, CAST (TABLE (SELECT DISTINCT StudentId, Mark FROM EXAM

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

Advantages of Exceptions Using the exceptions for the error handling has many benefits. Without an exception handling, every time you issue a command, you should ensure for th

Interesting properties of CROSS JOIN - SQL Compare these with the "interesting properties of JOIN", CROSS JOIN is associative but not commutative. Unlike JOIN and NATURAL JOI