|
INTERVIEW QUESTIONS
MICROSOFT
.NET DATABASE
DETAILS
Question: Using query analyzer, name 3 ways you can get an accurate count of the number of records in a table.
Answer: Answer1. a. Select count(*) from table1 b. SELECT object_name(id) ,rowcnt FROM sysindexes WHERE indid IN (1,0) AND OBJECTPROPERTY(id, ‘IsUserTable’) = 1 c. exec sp_table_validation @table = ‘authors’
Answer2. SELECT count( * ) as totalrecords FROM employee This will display total records under the name totalrecords in the table employee
use COUNT_BIG Returns the number of items in a group.
@@ROWCOUNT Returns the number of rows affected by the last statement. Use this statement after an SQL select * statement, to retrieve the total number of rows in the table
|
|
|
Category |
.Net Database Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.3) By 6514 users |
Added on |
9/13/2014 |
Views |
70946 |
Rate it! |
|
|
Question:
Using query analyzer, name 3 ways you can get an accurate count of the number of records in a table.
Answer:
Answer1. a. Select count(*) from table1 b. SELECT object_name(id) ,rowcnt FROM sysindexes WHERE indid IN (1,0) AND OBJECTPROPERTY(id, ‘IsUserTable’) = 1 c. exec sp_table_validation @table = ‘authors’
Answer2. SELECT count( * ) as totalrecords FROM employee This will display total records under the name totalrecords in the table employee
use COUNT_BIG Returns the number of items in a group.
@@ROWCOUNT Returns the number of rows affected by the last statement. Use this statement after an SQL select * statement, to retrieve the total number of rows in the table
Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
What are the types of cookies are there?
|
View Answer
|
|
How many types of cookies are there?
|
View Answer
|
|
Explain differences between ADO and DAO.
|
View Answer
|
|
What is State?
|
View Answer
|
|
Name atleast two methods of response object other than Transfer.
|
View Answer
|
|
Name atleast three methods of response object other than Redirect.
|
View Answer
|
|
What does Server.MapPath do?
|
View Answer
|
|
How can you deploy an asp.net application ?
|
View Answer
|
|
If there is a calendar control to be included in each page of your application, and and we do not intend to use the Microsoft-provided calendar control, how do you develop it? Do you copy and paste the code into each and every page of your application?
|
View Answer
|
|
How do you separate business logic while creating an ASP.NET application?
|
View Answer
|
|
What is the maximum length of a varchar in SQL Server?
|
View Answer
|
|
How do you declare a static variable and what is its lifetime? Give an example.
|
View Answer
|
|
What are good ADO.NET object(s) to replace the ADO Recordset object?
|
View Answer
|
|
What is the .NET datatype that allows the retrieval of data by a unique key?
|
View Answer
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All .Net Database Interview Questions & Answers - Exam Mode /
Learning Mode
|