SQL Server Interview Questions
Questions Answers Views Company eMail

Delete duplicate rows from a table without primary key by using a single query Table Employee empname salary A 200 B 300 A 200 C 400 D 500 D 500 Output should be A 200 B 300 C 400 D 500

14 12683

One table Test with single column. These are the values in the table a b c d e f g h I need a query (without using any variable) with output as - a b c d e f g h

1 1668

how to get the maximum among two tables,for example table 1 (dep1) have (emp_id,emp_name,salary) columns and table 2 (dept2) have (emp_id,emp_name,salary) columns,i want which employee have the maximum salary among two tables?

Deloitte, Lason,

9 17640

A left outer join B B right outer join A gives the same result then what is the use of two?

1 3404



2 6005

event classes in sql server

Accenture, AFE,

2 4385


L&T, CarrizalSoft Technologies,

4 7226

what is macro?

Wipro, Excel, Global Innovation,

5 8485

After recovering the database by using tail log backup.How to verify the data has been sucessfully restored or not.?



A successfully created SSIS package in SQL Server 2005 runs fine in MS BIDS and Integration Services. But gives error when run through an SQL-Job. What are the possible reasons?


2 2979

What is the disadvantage of using subquery exact after a select statement?ex. select (select * from sometable)

1 9617

What is Files and Filegroups in SQL Server & it's implementation.


1 6487

What is the joins and how many types of Joins in sql server a diffrentiate ever one give a suaitable query


2 3765

what is the difference detween pairwise comparison subquary and non pairwise comparison subquary?

2 11738

Diff between Composite key, Alternate Key, Candidate Key, Primary Key, Unique Key, Super Key, Foreign Key

1 8608

Post New SQL Server Questions

Un-Answered Questions { SQL Server }

hi, the following are the outputs of sp_spaceused and sp_tempdbspace sp_spaceused ------------ database size unallocated size tempdb 77752.95 MB 28026.99 MB sp_tempdbspace ------------- database size spaceused tempdb 77752.945312 1.007812 the unused space in sp_spaceused is nearly 28 Gb and in sp_tempdbspace is nearly 76 Gb cany any one explain about this output and why its giving different results.


query processing


application server is slow what may be the problem


Does any body please help me what question's have asked for SSRS in the interview?


your distribution database is full what will u do


This question asked during interview, 2) At the end of each month, a new table is created for each bank that contains monthly metrics consolidated at the account level. The table naming convention is bankX_YYYYMM where X represents the numeric designation of the bank and YYYYMM indicates the 4 digit year and 2 digit month. The tables contain the following fields: name data type description account text account number registered boolean indicates whether the account is registered num_trans integer number of transactions made during the time period spend numeric(9,2) total spend during the time period a) Write a SQL query that will display the total number of transactions and total spend for "Bank1" during the 4th quarter of 2009. b) Write a SQL query that will display the total number of transactions and total spend at "Bank1" and "Bank2", broken out by registered vs. non-registered accounts, during January 2010 not sure what is correct answer and how to solve?


what are questions asked in TCS for database tester (sqlserver)for 2-3 exp?


ow to bring suspect mode datbase online from scratch


How can we call UDF(User Define Function) using C# code in ASP.net ?


Any one plz send me SQL Server Developer/DBA resume for 4 years experience


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


How you trouble shoot when any job fails


how to do partition in sqlserver


Delete duplicate rows without using rowid.


what are the Prerequisites for Replication?