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 2000 Forums
 Transact-SQL (2000)
 SQL Statement To Select All Field Names

Author  Topic 

origdman
Starting Member

1 Post

Posted - 2004-06-16 : 12:20:36
I am trying to do a SQL Statement in Access to select all the field names in a table. Does anyone know if there is a statement for this?

Thanks

kselvia
Aged Yak Warrior

526 Posts

Posted - 2004-06-16 : 14:13:37
select COLUMN_NAME from INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'mytable'
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-06-16 : 14:14:06
Does Access have the INFORMATION_SCHEMA views?

Tara
Go to Top of Page

kselvia
Aged Yak Warrior

526 Posts

Posted - 2004-06-16 : 14:21:42
Oh no, I thought he was linking to SQL Server for some reason. In Access you can click tools+options+show system objects to show access system tables, but I'm not sure if the information is stored there.
Go to Top of Page
   

- Advertisement -