Query to get number of rows in a table.
select count(*) from tablename
ex:select count(*) as Count from emp
Output
Count
10
SQL Server Faqs
Movie Songs Lyrics
SOftware Testing -QTP Scripts,Testing Faqs
Showing posts with label sql queries collection. Show all posts
Showing posts with label sql queries collection. Show all posts
sql query to get column count of table-query to get number of columns in table
query to get number of columns of particular table using sqlserver
select count(*)as NOC from SYSCOLUMNS where id=(select id from SYSOBJECTS where name='tablename')
select count(*)as NOC from SYSCOLUMNS where id=(select id from SYSOBJECTS where name='tablename')
Subscribe to:
Posts (Atom)