SQL Server Interview Questions
Questions Answers Views Company eMail

select the 3rd maximum salary from sql server database if 4 (just an example In practically I may not know the exact situation) of the highest salaries are equal.


8 6758

Can we call SP inside a query?

CA, Wipro, CarrizalSoft Technologies,

5 6367

Can some one please help with a query which will take only max value of a column in a join.

2 2179



2 2981

which database is best to use in oracle and sql server? explain reasons?


5 4516

why we use cursor?

TCS, Melstar, CarrizalSoft Technologies,

4 10583

After using delete statement in sql query to delete some records...to retrieve the deleted records we can get using rollback command but till that where it stores means particular location name i need....(after deleting and rollback )

iGate, CarrizalSoft Technologies,

3 9706

if we have a column (Key) in a table. and values of that column is Key 1 1 1 2 2 3 3 4 4 5 5 5 and we want to show the data after query..like.. 1(3) 2(3) 3(2) 4(2) 5(3) how many times a single term comes..

TCS, 3i Infotech, Rolta,

17 8316

I am Having tables T1 and T2 both having same data how to check (or) compare the data in both table are same?

3 3486

Explain Trigger with an example?

2 9564

I am having table Title with TITLE id,Author ID, Publiser ID , table AUTHOR with Author ID, Author Name, table PUBLISER with Pub ID, Pub name Here hot to find out the publiser id who have relesed the books of patriticular author?

3 2391

Can anyone tell that the extra features are there in SQL SERVER 2008 that are not available in previous versions .



What is difference between Triggers and store procedure?

2 2873

How reterive duplicate value in SQL?

6 5917

What is Transaction?

2 3430

Post New SQL Server Questions

Un-Answered Questions { SQL Server }

Hi, I Created 3 Tables Person(PersID[prkey],Name,Email,Password), Project(ProjName,ProjID[prkey],ProjLeader,ProjManager) & ProjectInvolvement(EntryDate,ProjID[frkey],PersID[frkey],ProjDuration). For this how can i INSERT,UPDATE & DELETE Through PROCEDURE? Please Post the Answer for me. Desai.


which backup strategy you are following at ur company


How should i optimize the time for execution of stored procedure having single input and many output from the different tables?


code to create procedure for taking databse backup in sql server or i have the query for it but what it's query returns means i want to show on my jsp that the databse backup has been taken on the basis of that return value.does it returns 0 or 1.wat is the code for that


1.what are diff types of joins , and explain diff between cross join and full outer join 2.diff types of views 3. Diff types of index 4. What is diff b/w stores procedure and function procedure 5.diff between double and int in SQL 6.diff between char and varchar in SQL. 7.Oracle or SQL whice you will preferred and why.


Can you give me some DBCC command options?(Database consistency check) - DBCC CHECKDB - Ensures that tables in the db and the indexes are correctly linked.and DBCC CHECKALLOC - To check that all pages in a db are correctly allocated. DBCC SQLPERF - It gives report on current usage of transaction log in percentage. DBCC CHECKFILEGROUP - Checks all tables file group for any damage.


IF more than one Site is accessing the same Database server and I want to move the DB with Minimum down time? How will you do


Why we need to use secondry database file? though, we can do same work using primary database file also.


How do I repair damaged sql server mdf file database? In previous day my mdf file has got damage due to unknown reasons then I used dbcc chekcdb command but it failed, MDF file is important for me, I don’ know that how to get back mdf file data. Please anyone suggest me?


how to take backup bcp out for a column in table in sql server?


System variable and temporary variables


How do we upgrade from SQL Server 6.5 to 7.0 and 7.0 to 2000?


Write a Select Query to display title for each group of records, which are collected with Compute Clause? Like titlefield column-A column-B ..... ..... ..... Sum ... titlefield column-A column-B ..... ..... ..... Sum ...


how can you select rexcord(rows) from table A which is not present in Table B . Id being the FK in Table B referencing to ID Table A


How we create SQL Server 2005 Reporting Services ? Give me Sample