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
Mention various steps required to draw an E-R Diagram. Draw an E-R Diagram for Student Information System. Mention all suitable assumptions to justify your answer.

CREATE TABLE prodtrans ( pno number (4) ptype char (1) CHECK (ptype in ('I','R','S')), qty number (5) FOREIGN KEY pno REFERENCES product (pno) ON DELETE CASCADE);

What is document scanning and imaging? Document scanning and imaging, or digital archiving, is the method of scanning a document into a digital image to archive and retrieve a

Describe the primary key functions? Primary Key : The primary key is an attribute or a set of attributes in which uniquely identify a specific example of an entity. Every entit

Whta is the advantage of the database management approach? The advantage of the database management approach is data is integrated and can be accessed by multiple programs.

Name the three major set of files on disk that compose a database in Oracle. There are three main sets of files on disk that compose a database. All the files are binary. These

Northwind Pty Ltd sells a variety of food products throughout the world. They want to use the reporting features of SAP''s Business Information Warehouse to better understand thei

The indices are accumulated in the index files. The data is accumulated in the data files. Indices give fast access to data items. For example, a book database may be managed in th

What is the difference among a database schema and a database state? The collection of information stored in database at particular moment in time is known as database state a

prototype of a distributed information system for a national car part retail outlet chain.