View Single Post
  #3 (permalink)  
Old March 28th, 2011, 03:01 AM
arbab arbab is offline
Authorized User
Points: 350, Level: 6
Points: 350, Level: 6 Points: 350, Level: 6 Points: 350, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2008
Location: , , Pakistan.
Posts: 54
Thanks: 8
Thanked 1 Time in 1 Post
Default You mean to say that 'Default' will not work to insert values.

@ disel2010: You mean to say that ‘Default’ does not work, we need to have insert query to fill the columns, I am learning Oracle/SQL commands from a website where I found this:
Sometimes, we want to provide a default value for each column. A default value is used when you do not specify a column's value when inserting data into the table. To specify a default value, add "Default [value]" after the data type declaration. In the above example, if we want to default column "Address" to "Unknown" and City to "Mumbai", we would type in
CREATE TABLE customer
(First_Name char(50),
Last_Name char(50),
Address char(50) default 'Unknown',
City char(50) default 'Mumbai',
Country char(25),
Birth_Date date)


Referece:
http://www.1keydata.com/sql/sqlcreate.html

Thanks in advance
__________________
How to do programming?