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: i) Explain the terms data warehousing and data mining. ii) Discuss the importance of the following security principles that a digital firm should amongst others, n

read-set(T) : Each data items that are read by a transaction T Timestamps : for all transaction T, the start-time and the end time are reserved for all the three phases.

Differentiate between a unique key and a primary key. - By default, clustered index on column are created by primary key while nonclustered index are created by unique key.

1.  Based on the dependency diagram, create a database whose tables are in at least 2NF, showing the dependency diagram for each table (as shown in class).  Label the types of depe

1.Suppose you are given a dataset that consists of a random sample of tasters, on which the following variables were obtained: (y) Zpref = taste preference for green beans store

Gaps in sequence values can happen when: -     A rollback happens that is when a statement changes are not accepted. -     When the system crashes -     When a sequence i

Need an expert in ER database theoretical and modeling database system Project Description: Need an expert in ER database theoretical and modeling database systems? Skills

construct a b-tree for the following set of key values 2,3,5,7,11,17,19,23,29,31.assume that the tree is initial empty and the values are added in ascending order

Explain the Check Clause The CHECK clause is employed to at the end of a CREATE TABLE statement specify table constraints. This is known as table-based constraint because it ap

Database Administrator One of the main perpose for having the database management system is to have control of both data or programs accessing that data. The person having li