dot net tips, DotNet tips, .Net Tips,Dot Net tips and tricks,Dot Net Solutions, OOPS Concept in C#,SQL Server, LinQ, Ajax, Java script, JQuery, Server Error details, daily .net tips and tricks , DotNet Interview Questions.
Count Columns in a Table SQL
SELECT count(*) from information_schema.columns where table_name='giveTableNameHere'
or
SELECT count(*) FROM syscolumns WHERE OBJECT_NAME(id) = 'giveTableNameHere'
here i given my tested query for counting columns in a particular Table in a DB