Insert into command, Database Management System

INSERT INTO command:

  • Values can be inserted for all columns or for the selected columns
  • Values can be given by sub query.
  • In place of values parameter substitution can also be used with insert.
  • If records are not available for all the columns, then the column list must be contained following the table name.

 

Example:Insert the employee numbers, an increment amount of Rs.500/- and the increment date-today (which is being entered through function SYSDATE) of all the managers into a table INCR (increment due table) from the employee file.

INSERT INTO INCR SELECT EMPNO, 500, SYSDATE FROM EMP WHERE JOB = 'MANAGER';

Example: Insert values in a table using parameter substitution (& operator is used for it 1, 2 are the field numbers).

INSERT INTO EMP #VALUES (&1,'&2','&3', &4, &5, &6,NULL, &7);

Please note these values required to be supplied at run time.

UPDATE Command: Syntax is UPDATE = WHERE ;

Posted Date: 3/11/2013 1:09:32 AM | Location : United States







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

Write discussion on Insert into command
Your posts are moderated
Related Questions
i have assignments I don''t have time to finish because of work and other assignments, can you help with this? All are from the book Darabase design, application development and a

Benefits and Limitations od Data Models?

what is the need of a log in dbms

#question.what is mapping constraints and types?.

List the Armstrong's axioms for functional dependencies.  What do you understand by soundness and completeness of these axioms?      Ans: The Armstrong's axioms are: F1:

Explain Hashing techniques The hashing techniques can be categorized as: Static Hashing Techniques - In this method, the data can be viewed a collection of buckets, along with

What are the function of DBA?

Explain the Difference between DROP and DELETE DELETE deletes one or more than one tuples of a particular relation from the database. DROP is employed to remove a table from th

(a)    Provide the description of the following ODMG schema in the Object Definition Language (ODL). (b)   Based on the above object database, write the following queries i

What is the difference between a HAVING CLAUSE and a WHERE CLAUSE? HAVING CLAUSE - HAVING CLAUSE is used only with SELECT statement. - It is normally used in a GROUP BY