Sqlserver Interview questions


Total available count: 45
Subject - Databases
Subsubject - Sqlserver

When is the use of UPDATE_STATISTICS command?

UPDATE_STATISTICS command is basically used when a large processing of data has occurred.

If a large number of deletions any modification or Bulk Copy into the tables has occurred, it has to update the indexes to take these changes into account. UPDATE_STATISTICS updates the indexes on these tables accordingly.
 
Here is T-SQL Command:
1. Update All Statistics with sp_updatestats
EXEC?sp_updatestats
2. Update all statistics on a table
UPDATE STATISTICS?TableName

3. Update the statistics for an index

UPDATE STATISTICS?TableName, IndexName

 




Next 5 interview question(s)

1
What is difference between DELETE and TRUNCATE commands?
2
What are the difference between clustered and a non-clustered index?
3
What is the difference between a primary key and a unique key?
4
What is NOT NULL Constraint?
5
What is Check Constraint?