Tag: SQL INTERVIEW QUESTIONS

View Compatibility level of Database

To know what is compatibility Level check this post link. You can view the compatibility of SQL Server Database in two ways. From SSMS. Open SSMS -> Right click on Database -> Click properties -> Click on Options tab.            2. By running below SQL you can get the compatibility level

SQL Server Compatibility Level

SQL Server Compatibility level will be used to decide how SQL will use it features. By setting compatibility level will make sure that SQL will follow that particular compatibility level version. It is a database property and will only affects the features for that particular database. For example with SQL 2014 or higher the new

View in SQL server

A view is a virtual table.  View will not store any data physically. The data is pulled from the underlying base table when you call a view. Advantages of View : 1.It can be used to combine multiple tables and can have required columns for them.            Example :            Let us consider below three

How to check transaction log file size in Sql server

In SQL server to check transaction log file size you can simply run this dbcc sqlperf(“logspace”) . This query will provide you the transaction log usage statistics for all the databases.   The other way round is to run this DMV query which will provide you the usage for the selected database. Note,this will provide you

What is a heap table

A HEAP table in a sql server is a table without a clustered index. It can have non clustered index on it. A Table with a clustered index is called clustered table. Since it does not have clustered index the data in this table won’t be in sorted order. When you want to insert data