Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 field names of global table

Author  Topic 

arkiboys
Master Smack Fu Yak Hacker

1433 Posts

Posted - 2012-01-25 : 09:25:35
Hi,
How is it possible in sql to get the fieldnames of a global table.
I can use the following sql for a table but not a global table.
Any thougts please?
Thanks

a global table does not seem to work here.
select column_name from information_schema.columns
where table_name = '##tblMain'

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2012-01-25 : 09:33:48
use tempdb
go
select top 10 * from
information_schema.tables
where table_name like '##%'


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page
   

- Advertisement -