Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 How to Insert row in a table

Author  Topic 

rowter
Yak Posting Veteran

76 Posts

Posted - 2009-08-27 : 11:28:21
Hi,

i have 3 columns in a table coltyp, colnm, colod of which all the rows of colod are null.
only coltyp and colnm are populated
The coltyp column has same value 'destination' from 1 to 55 rows.

I want to insert a row at 21st position in this table how can i insert a row in this table?
The coltyp column has same value 'destination' from 1 to 55 rows.

Thanks in advance

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-08-27 : 11:33:11
whats the pk column of table?
Go to Top of Page

rowter
Yak Posting Veteran

76 Posts

Posted - 2009-08-27 : 11:41:33
col_typ might be the PK column
how can i check for PK col?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-08-27 : 13:11:08
just look for sp_help 'table name' and look for pk column
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-08-28 : 02:41:53
or

exec sp_pkeys 'table_name'

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -