waqarlaghari
Right there with Babe
Points: 791
More actions
July 22, 2009 at 10:26 pm
#203079
Dear brother's
I want a script that generate no. of cloumns in existing table. is it possible if yes then please send me script.
thanks in advance.
Best regards
Waqar Hussain Laghari
Pandian S
SSChasing Mays
Points: 625
July 23, 2009 at 1:22 am
#1028780
SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='TABLENAME'
SELECT [NAME] FROM SYS.SYSCOLUMNS WHERE ID = OBJECT_ID('TABLENAME')
SELECT [NAME] FROM SYS.COLUMNS WHERE [OBJECT_ID] = OBJECT_ID('TABLENAME')
SP_COLUMNS 'TABLENAME'
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply