| Author |
Topic |
|
Vack
Aged Yak Warrior
530 Posts |
Posted - 2011-12-07 : 11:44:34
|
| How to I insert a record into a table? Do I have to list the column names somewhere?insert into shipdtlbackup(9999,9999,1,'BOLT','DESC','VND',22,'123',0,'S',' ',' ',' ',0,3.876,' ',' ',7.8765,999,99999)FROM SHIPDTLBACKUP |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-12-07 : 11:53:36
|
| [code]insert into shipdtlbackupvalues(9999,9999,1,'BOLT','DESC','VND',22,'123',0,'S',' ',' ',' ',0,3.876,' ',' ',7.8765,999,99999)[/code]if you're passing values for all columnsif not you need to list the columns after tablename and before values clause like below[code]insert into shipdtlbackup(column1,column2,..columnn)values(9999,9999,1,'BOLT','DESC','VND',22,'123',0,'S',' ',' ',' ',0,3.876,' ',' ',7.8765,999,99999)[/code]------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|