SQL Server Interview Questions
Questions Answers Views Company eMail

In the below query i have performed the commit transaction statement but still the values after the save are not saved. Can you please let me know why are the statements after save are rolled back even after commiting the data. help me with the understanding declare @trans2 varchar(10)='transaction2' begin transaction @trans2 insert into emp values(100,'xy',600); save transaction @trans2 insert into emp values(200,'pq',700); insert into emp values(300,'pq',800); commit transaction @trans2 rollback tran @trans2


1 1557

Repair mdf file

2 1295

Help!!!!!!!!!!!! My database has gone offline, it is highlighted as 'Suspect'. Foolishly, i haven't got a recent back up. Is there a way of quickly restoring the database? Thank you


sql database suspect We have a sql database that is showing as suspect. How can we recover?


what is cursor?why we will go to cursor?advantages &disadvantages of cursors?

1 1152

How do you find value of first column before inserting value into the second column in the same table for checking that second column must have different value than first column.


2 2173

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?


Restore database SQL2000, SQL2012 Backup of base is created in Microsoft SQL Server 2000 - 8.00.2066, I can't restore on Microsoft SQL Server 2012 - 11.0.2100.60

IT Decisions,

3 1292

two tables are there.1st table EMP has two columns ID and name and contains data 1,A 2,B 3,C 2nd table EmpSal has 2 columns ID and Salary Contains data -1,1000 2,5000 3,3000 Find name of employee having maximum salary ?


5 1741

I have a table emp , Fields with empname,dnname,dno,salary. now I want copy distinct salary with all emp detail from emp into new table which is not already exist in database. how would I do this ?

Techno Labs,

2 1409

how to copy only distinct data into another table which is not already exist in database?


2 2000

difference between function and procedure

HCL, Theorem, TCS, Cognizant,

3 2146

2) Consider a Table name A which has below records ID --- 5 5 5 5 5 Consider another table B which has below records ID -- 5 5 5 5 5 5 5 5 How many rows will be returned by each of the below queries a) select * from A inner join B on A.id = b.ID b) select * from A left join B on A.id = b.ID c) select * from A right join B on A.id = b.ID

Synechron, TCS,

2 2156

How to read 2nd highest sal from EMP table?


5 2158

how to overcome kernel isssues



Post New SQL Server Questions

Un-Answered Questions { SQL Server }

In my application I have a process which picks the scanned files (tif format) from a shared location and it links to application and shown on it.The actuall issue is that my process picks the file before it is completly written or scanned which results in displaying few parts of the image or incomplete image.I need to check if the file is not completly scanned or written then do not link it to application.Please help if any body tell me that how can i check that file is in written phase or locked through DTS.thanking you in advance


Scalability, Availability, Integration with internet, etc.)?


your distribution database is full what will u do


How do use Having,Group by,Group function in SQL?


explain the difference between oracle- sql and sql server sql ? if both are same y we r using 2 sw.s?


Can we make the the chages By Using the Sql if u know any function or process please inform me Actuall result: BRK1 Break 1 Part 1 00:01:00:00 60 BRK1 Break 1 Part 2 00:01:00:00 60 BRK2 Break 2 Part 1 00:01:00:00 60 BRK2 Break 2 Part 2 00:01:00:00 60 BRK2 Break 2 Part 3 00:01:00:00 60 BRK3 Break 3 Part 1 00:01:00:00 60 BRK3 Break 3 Part 2 00:01:00:00 60 Desired O/P: BRK1 Break 1 Part 1 00:01:00:00 60 Part 2 00:01:00:00 60 BRK2 Break 2 Part 1 00:01:00:00 60 Part 2 00:01:00:00 60 Part 3 00:01:00:00 60


plss anybody specify tha constrian management system in dbms


Tell about MOM Tool(Microsoft Operator Manager)?


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


What is the difference between NOROW and LOCKROW?


New concepts of sql server 2005 use in your project.


In one interview...interviewer ask me question pleas tell me sql server architecture.. can any body tell me the sql server architecture with digram


If we delete pack Spec what will be the status of pack Body ?


what is the sql equivaent of the dataset relation object ?


where the connection string store in the database