SELECT 'SELECT ' + QUOTENAME(column1,'''')+',' + QUOTENAME(column2,'''')+',' + QUOTENAME(column3,'''') + ' UNION ALL' FROM myschema.mytable
Post a Comment
No comments:
Post a Comment