Thursday, July 05, 2012

how to find by number's

--find no of stored procudere in a database
select count(*) from MMF..sysobjects where xtype='P'

----find no of table in a database
select count(*) from MMF..sysobjects where xtype='U'

--find no of columns in a table
select count(*) from information_schema.columns where table_name='login'

----find no of rows in a table
select count(*) from login

--note: here MMF is a database

No comments:

Post a Comment