Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How To Omit Columns with Default Values in INSERT Statement
How To Omit Columns with Default Values in INSERT Statement? - Oracle DBA FAQ - Understanding SQL DML Statements
✍: FYIcenter.com
If you don't want to specify values for columns that have default values, or you want to specify values to columns in an order different than how they are defined, you can provide a column list in the INSERT statement. If a column is omitted in the column, Oracle applies 3 rules:
The following tutorial exercise gives a good example:
INSERT INTO fyi_links (url, id)
VALUES ('http://sqa.fyicenter.com', 103);
1 row created.
SELECT * FROM fyi_links;
ID URL NOTES COUNTS CREATED
----- ------------------------ -------- ------- ---------
101 http://dev.fyicenter.com NULL 0 30-Apr-06
102 http://dba.fyicenter.com NULL 0 07-MAY-06
103 http://sqa.fyicenter.com NULL NULL 07-MAY-06
2007-04-21, 4969👍, 0💬
Popular Posts:
Can one execute dynamic SQL from Forms? Yes, use the FORMS_DDL built-in or call the DBMS_SQL databas...
How To Use Subqueries with the IN Operator? - MySQL FAQs - SQL SELECT Statements with JOIN and Subqu...
How Many Tags Are Defined in HTML 4.01? There are 77 tags defined in HTML 4.01: a abbr acronym addre...
What is the difference between const char* p and char const* p? In const char* p, the character poin...
.NET INTERVIEW QUESTIONS - How to prevent my .NET DLL to be decompiled? By design .NET embeds rich M...