If you are working in Query Analyzer you can look in the sysobjects, syscolumns, and systypes tables. To get the name you can use this example, but you will need to add type and length.
select SO.Id,
TableName = SO.Name,
ColumnName = SC.name
from Sysobjects SO
Inner join Syscolumns SC on SO.id = SC.id
where SO.TYpe = 'U'
order by SO.Name
I recommend looking into the Information_schema views if you use SQL 7 or later.
Example: List columns in Employees Table
Select
Column_Name, Data_type,
Data_Length=Isnull(NUMERIC_PRECISION, CHARACTER_MAXIMUM_LENGTH) From DBName.information_schema.columns
Where Table_name='Employees' Terry L. Broadbent Programming and Computing Resources
Actually, Structured Query Language, like most things in the computing world, has been shortened to SQL. Basically, SQL is a standardized language for retrieving and manipulating data in relational databases.
I recommend that you start a new thread rather than add to an exisiting thread if you have a new. This is especially important if your question is off the topic of the thread. Terry L. Broadbent Programming and Computing Resources
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.