How can u get the number of pupils connecting the database?



How can u get the number of pupils connecting the database?..

Answer / sreenivas

try this below query:

use <databasename>
go
select db_name(dbid) as db, count(dbid) as connections from sys.sysprocesses where dbid > 0 group by dbid

Is This Answer Correct ?    5 Yes 0 No

Post New Answer

More SQL Server Interview Questions

What is a job?

3 Answers  


What are constraints? Explain different types of constraints?

26 Answers   Emsang, Kendriya Vidyalaya(Kvs), Polaris, Wipro,


What are .mdf files?

0 Answers  


Explain the relational database management system (rdbms)?

0 Answers  


How many files can a database contain in sql server?how many types of data files exists in sql server? How many of those files can exist for a single database?

0 Answers  






Tell me about joins in database system and explain each in detail.

0 Answers   Axtria, ITC Indian Tobacco Company,


What is trace flag in sql server?

0 Answers  


How many types of database relationship in sql server?

0 Answers  


Following are some of the question related to below mentioned query? select e1.salary from employee3 e1 where 2= ( select count(distinct(e2.salary)) from employee3 e2 where e2.salary>=e1.salary ) 1) What the query returns? 2) How it works? - Detail explanation (what the sub query does, why it is (where 2=)....etc...Please?

5 Answers  


How can you check the version of sql server?

0 Answers  


How to count the number of duplicate items in a table?

3 Answers  


What are the requirements on sql server network connections?

0 Answers  


Categories