Adding mutiple column in existing Table

  • 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

  • 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