[B]Question asked by visitor Kishor[/b]
How to insert value in SQL Table?
I have created a table stime etime both of data type is datetime
What is syntax of insert the data in the table?
Printable View
[B]Question asked by visitor Kishor[/b]
How to insert value in SQL Table?
I have created a table stime etime both of data type is datetime
What is syntax of insert the data in the table?
insert into <table name > values ('name','address',.....................);
this is one of syntex
insert into <table name > column's name(column_1, column_2,....) values ('name','address',.....................);
example:-
INSERT INTO EMPLOYEE_TBL (EMP_ID, LAST_NAME, FIRST_NAME, MIDDLE_NAME, ADDRESS, CITY, STATE, ZIP, PHONE)
VALUES ('123456789', 'SMITH', 'JOHN', 'JAY', '12 BEACON CT','INDIANAPOLIS', 'IN', '46222', '3172996868');
eg:-insert into mca values(&sid,'&sname',&dob);
Adding to the above friend's suggestion:
Use same above they mentioned the syntax. but value must be like '21-Sep-2007'
as our friend said the date format is must be in like '21-aug-2007' but it depends on the dbmsystem to verify which format is supported type the command
sysdate
my friend sriram is it correct?:confused:
please kindly mail me the correct one if it is worng:)
Insert into table values('18-sep-2007','18-sep-2007');