Quick Search:
 
 The Oracle PL/SQL VALUES Keyword      [Return To Index] Jump to:  

Term: VALUES

Definition:
VALUES

In Oracle PL/SQL, the VALUES keyword appears in the conventional INSERT statement. It is a mandatory keyword in INSERT statement.

Example Syntax:

INSERT INTO TABLE[Column spec]
VALUES
[Columns values]


Example Usage:

The below INSERT statement inserts a row into EMP table

INSERT INTO EMP (EMPID, ENAME, DEPTNO, SAL, JOB_ID)
VALUES
(SEQ_EMPID.NEXTVAL, 'MILLER',10,4500,'DEV')
/

1 row inserted.


The VALUES keyword can also be used without specifying the columns, as shown in this example:

INSERT INTO EMP VALUES
(SEQ_EMPID.NEXTVAL, 'MILLER',10,4500,'DEV')
/

1 row inserted.


To use the VALUES keyword in this manner the number of values to be inserted must exactly match the number of columns in the table.


Related Links:

Related Code Snippets:
 
   Home |    Search |    Code Library |    Sponsors |    Privacy |    Terms of Use |    Contact Us © 2003 - 2024 psoug.org