SQL - Structured Query Language

INSERT Statement / Random Column(s)



SQL Server allows you to ADD record(s) using Column Name(s). Even, if you do not know particular numeric field / string field value, simply ignore the Column Name(s). If particular column is NOT NULL then you must type Empty Quotes or Zero to avoid constraint error. The following INSERT statement is used to add Random Column(s) record in PRODUCT Table.

-- Example 18 --

 

INSERT INTO Product (Prod_Code, Prod_Name, Batch_No, Exp_Date, Prod_Tax)

                                                     VALUES ('PROD4','',12345,'12-31-2007',0)


Query Output Screen



* * * * *


Email Your Comment To AUTHOR