Hi, how can i get the number of columns in a table(column count) in MSAccess Or SqlServer.
i had a little knowledge in Queries
can any one help me out sesh
SELECT COUNT(*) FROM table;
hope this helps, good luck!!
That's the number of rows, not columns. In MSSQL you can query the systemobjects and systemcolumns tables. This might get you started
select B.name 'TableName', A.name 'ColumnName'
from syscolumns A, sysobjects B where A.id = B.id and B.type = 'U'