Answers

Question and Answer:

  Home  Oracle Database

⟩ How To Specify Default Values in INSERT Statement using Oracle?

If a column is defined with a default value in a table, you can use the key word DEFAULT in the INSERT statement to take the default value for that column. The following tutorial exercise gives a good example:

INSERT INTO ggl_links VALUES (102,

'http://www.rendc.org',

NULL,

0,

DEFAULT);

1 row created.

SELECT * FROM ggl_links;

 ID URL    NOTES  COUNTS CREATED

----- ------------------------ -------- ------- ---------

101 http://www.rendc.org NULL 0 30-Jul-08

102 http://www.rendc.org NULL 0 07-MAY-06

 146 views

More Questions for you: