Is there a way to get a tables name from the table itself?
What i'm trying to do is create a join from information_schema to a table using the name, soo kinda like
SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.Columns inner join dbo.comp A on A.[b]table_name[/b] = INFORMATION_SCHEMA.Columns.table_name where TABLE_NAME = 'comp'
the above doesn't work obviously but thats the idea