Forum Replies Created

Viewing post 1 (of 1 total)

  • Reply To: Need Create View Script for all tables

    SELECT 'CREATE VIEW ' + tb.TABLE_SCHEMA + '.vw' + tb.TABLE_NAME + ' AS SELECT '+

    (SELECT STUFF((SELECT ',t.' + vp.Column_Name FROM information_schema.columns vp

    WHERE vp.Table_Name=tb.TABLE_NAME and vp.Table_Schema=tb.TABLE_SCHEMA FOR XML PATH('')), 1, 1,...

Viewing post 1 (of 1 total)