Category Archives: Interview Questions

Interview Questions

Interview question – Is Clustered index on column with duplicate values possible?

Through this article, we are going to discuss three important interview questions of SQL which are given below:-  1) Can we create clustered index on a column containing duplicate values?  2) Can we create a Primary Key on a table on which a … Continue reading

Posted in Interview Questions, SQL Advanced, SQL Indexes | Tagged , , , | Leave a comment

Question of the Month (July)

Question of the Month Suppose we have a table emp_plan  which contains 4 columns “Empid” (employeeid), Planid (Projectid), Startdate(Allocation Start date) and Enddate (Allocation Enddate). Its structure is given below:-4  Create table emp_plan (empid nvarchar(200),planid nvarchar(20),startdate datetime, enddate datetime) Also below … Continue reading

Posted in Interview Questions | Tagged , | 23 Comments

Script to find complete months between two given dates

Complete months between two given dates Below script will help in finding the complete months within the 2 given dates. In the below script we takes below dates as exampleStartdate =2015-07-05 Enddate =2016-01-06 /**********************Script Start**************************/ IF (object_id(‘tempdb..#month’) is not null) … Continue reading

Posted in Interview Questions, SQL Basic, SQL Server | Tagged , , | Leave a comment

Script to find the complete weeks within two given dates

Complete weeks within two given dates Sometimes we need to find out the complete weeks within two given dates. Below script will help in finding the complete weeks within 2 given dates. In this script, I have used below dates … Continue reading

Posted in Interview Questions, SQL Basic, SQL Server, SQL Tips | Tagged , | 21 Comments

Interview questions for database developer

Technical Round Database Interview Questions 1) What are the different types of Trace flags which we used for detecting the Deadlock? 2) What are the different types of database backups? 3) How do you perform the Error handling in SQL … Continue reading

Posted in Interview Questions | Tagged | 32 Comments

SQLTea – New SQL tutorial app in Google play store

SQLTea – Our new SQL Tutorial App on Google Play Store We are happy to announce our new SQL tutorial app SQLTea  ( Native android app) for SQL learning which includes articles from this blog. This application includes  1) Articles … Continue reading

Posted in Interview Questions, Miscellaneous | Tagged , | 18 Comments

Question of the Week -08/04/2014

Suppose we need to find out the name of all the months in a given year (Year will be given as an input parameter) where first day of the month falls on weekend (Saturday or Sunday).  So what should be … Continue reading

Posted in Interview Questions | Tagged | 30 Comments

Answer – Objective Question (How many Null values in an unique constraint can be inserted in SQL Server)

Question:- How many NULL value allowed in a column in which Unique constraint is defined in SQL Server? Options:- a) 1 b) 2 c) More than 1 Answer :- Option a) 1 In SQL Server, we can Insert only one null … Continue reading

Posted in Interview Questions | Tagged | 31 Comments

Question of the Week – 11/1/2014

Question:- Suppose there are two tables A and B and we need to write 3 SQL queries which returns the record set as shown in the below figure. First Query:- In this case, you have to write a SQL Query using SQL JOIN which … Continue reading

Posted in Interview Questions | Tagged | 31 Comments

Answer – Objective Question (In which database temporary tables are created in SQL Server)

Question :- In which database temporary tables are created in SQL Server? 1) User database (where temporary table are defined)     2) Master database     3) TempDB (Correct Answer) 4) Model Database 5) None of the above Answer … Continue reading

Posted in Interview Questions | Tagged | 31 Comments