Wednesday, June 15, 2022

Oracle SQL Insert

 It is used to insert new records into the table.                                                insert into <table_name> (col1, col2,. . . coln) values(val1, val2, .......,val-n);

In above syntax,                                                            

1.    Number of columns and number of values should be same.

2.    Character values and date values should be in single quotes.                         

 Note: Before insert any record, we should ensure, the order of data types of values should be equal to the order of datatypes of columns.

INSERT INTO emp VALUES( 7839, 'KING', 'PRESIDENT', null, to_date('17-11-1981','dd-mm-yyyy'),
 5000, null, 10 );

 

No comments:

Post a Comment