I have created some custom types that will be used as table parameters. Is there a way to select columns, how can I select columns for a table:
SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME LIKE 'MyTable'
Edit: yes, I tried to read MSDN, but I do not see the information there. My current workaround is to create a persistent table as follows:
CREATE TABLE Placeholder(copy-and-paste all the columns from my type here)
I can then select from INFORMATION_SCHEMA.COLUMNS and remove the Placeholder when done.
source share