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
Question: a) There are three concurrency problems, i.e. three types of potential mistake which could occur if concurrency control is not properly enforced in the database syst


Explain the disadvantages of file oriented approach? In the oriented approach Applications are designed in isolation. Design of application is optimized for one application. In

Attribute Preservation This is a easy and obvious necessity that includes preserving all the attributes that were there in the relation that is being decomposed.

Concurrency issues Data integrity: Threads accessing same object need to be synchronized, such as: banking account. Deadlock: One or more threads in system are perman

Explain group By clause in SQL? Group By clause in SQL: The GROUP BY clause can be used in a SELECT statement to collect data across multiple records and group the results thro


The dataset " CFOLYMPICS.XLS " contains the observations used in the above article.  The definitions of the variables are also included in this spreadsheet.  However, for the purpo

Question: This form represents one of a number used for each sailing of a range of boats. A passenger may go on many sailings and will have the same passenger number for each.

A software contract and consultancy firm maintains details of all the various projects in which its employees are currently involved. These details comprise: Employee Numbe