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 want notes on this topic

List the internal controls that should be in effect solely because a EDP system is employed, classifing them as (1) Those controls pertaining to input of information and (2) All ot

Which two files are used during operation of the DBMS? Data dictionary and transaction log are two files used during operation of the DBMS.

How to define a job scheduling strategy that will meet business requirement of reporting availability by 6am CST for the following cubes? Show the job scheduling dependencies in a

Explain the EXEC statement in SQL  Ans: All statements which start with EXEC SQL are embedded SQL database statements. High level languages such as C can be employed to write a

Locks: Serialisabilty is just a test whether a given interleaved schedule is ok or has a concurrency related trouble. Though, it does not make sure that the interleaved concurrent

Explain Superkey Ans: A superkey is described in the relational model of database organization like a set of attributes of a relation variable for which it holds that in all re

Explain the θ-join and equijoin Refer tables Car and Boat which list models of cars and boats and their relevant prices. Assume a customer wants to buy a car and a boat, but sh

gyan gurukul is a software company that provides software related solution.