| Other SQL Server Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| What is a Stored Procedure? | | 7 |
| Say if we have a table that contains only a single column ,
say OrderID, which has IDENTITY attribute defined on it. So
how can we insert data in this table.
I am reframing my question, that how can we make the table
to increment the column "OrderID" value several times??? | | 3 |
| Table student containing 2 columns,Join date,Employee name.
Under join date 4 rows r ter =1-jan-2008,2-feb-2008,3-mar-
2008,4-feb-2008.Under Employee name 4 difeerent names
jaison,robin,binoy,rahul
Result set is,
Table containing 4-column name=jan,feb,mar,april,,beneath
these months count is given as 1,2,1,0 means these counts
representing number of emplooyees joined in a month(january
1employee,february 2 employee,march 1 employee,april 0
employee)
Can you give me the required sql query | Wipro | 3 |
| what purpose does OPENXML clause have in sql server stored
procedure? | | 1 |
| i have table students with fields classname,studname
select * from students
classname studname
1 xxxxx
1 yyyy
1 zzzz
2 qqqq
2 tttt
3 dsds
3 www
i want the output should be
No of students in class 1 : 3
No of students in class 2 : 2
No of students in class 3 : 2
| HCL | 2 |
| Please get the 4 th maximum salary from a table without
using any sql keyword (TOP,MAX are mot allowed) | | 5 |
| WRITE A FUNCTION TO DISPLAY THE OUTPUT OF AN EXISTING TABLE
RANGE LIKE COMMAM SEPERATED VALUES LIKE RANGE1,RANGE2,... | TVS | 2 |
| how can u select the Distinct values in the table, table
having 20 columns , i want all columns | | 1 |
| which query u can write to sql server doesn't work
inbetween 7.00PM to nextday 9.00AM | Wipro | 4 |
| Is it possible to delete duplicate rows in a table without
using a temporary table ? | | 6 |
| create index a on employee(dno)
In this,which index was created? | | 2 |
| Why Do you want to work in this company? | HCL | 3 |
| how to update a null value field in sql server
eg
a table contains 3 fields id,name,salary
and 3 records
salary of 1 record is null
i want update the nullfield
111 arun 300
112 ddd 200
113 ttt null
i want to update table with add 100 to every record include null
after updation
the recrds should be
111 arun 400
112 ddd 300
113 ttt 100
| HCL | 6 |
| in tabase table having a column in it empname field is
there which having 5 duplicate values is there i want
deleted all the duplicates i want showing only one name
only. | | 7 |
| Can I remove the default constraint columns in SQL SERVER? | Value-Labs | 3 |
| Write an SQL query if u want to select the data from one
block which intern reflects in another block ?
thanx,do reply | Covansys | 1 |
| how to get the rowid/rownumbes of a table in sqlserver | IBM | 5 |
| there is a table having two columns no and name
and the data is
1 A
2 B
3 C
write a query that will result a horizontal output
A,B,C
| vsworx | 7 |
| How many max. conditions can b written under the WHERE
clause?
Like select * from [tabnam] WHERE
(cond1...or..cond2....or...cond3...and.....so on.....???
(upto how much extent))????? | SAP-Labs | 2 |
| Please give me the SP for the below scenario. I have two
tables named Table1 and Table2...I need to fetch record by
record from Table1 and insert the record in to table2 where
the value in the sno column of the table1 is even number. | Value-Labs | 4 |
| |
| For more SQL Server Interview Questions Click Here |