Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Microsoft Interview Questions

Author  Topic 

testingcareer.kpc
Starting Member

2 Posts

Posted - 2011-02-14 : 06:15:39
Hi ,

Can anyone help me in answering the below questions on SQL :

SQL Queries :
1)I have two tables :
COuntry,city
I want all the cities in each country.Question on Cross Join.


2) I have one table :EID,Depid,ename,sal
I want to have max(sal) in each department.

3) There are three tables :
E : EID,ENAME
D : DID,DNAME
empdept : eid, did


select the employees who doesn't belong to any dep

4)Discussion on Except ,using cast like type cast. Question in the context of difference between two tables

5) There is a big table with "n" of rows and 40 + columns .It doesn't have primary key.How do you select the primary key.
In other words how do you get the duplicate records.

Regards,
Prasad

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2011-02-14 : 06:22:37
What have you tried so far?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

Sachin.Nand

2937 Posts

Posted - 2011-02-14 : 07:55:45
Were those questions asked at Microsoft ?

PBUH

Go to Top of Page

testingcareer.kpc
Starting Member

2 Posts

Posted - 2011-02-16 : 07:19:21
quote:
Originally posted by madhivanan

What have you tried so far?

Madhivanan

Failing to plan is Planning to fail



I tried this :
I have one table :EID,Depid,ename,sal
I want to have max(sal) in each department.

select depid,max(sal) from <table name> group by depid;
Go to Top of Page

tra072011
Starting Member

1 Post

Posted - 2012-08-18 : 00:03:01
Hi

You can find this info by using search box in the top of website with some keywords related before posting questions.

If you want to get more materials that related to this topic, you can visit: Microsoft interview questions

Best regards.

http://interviewquestionstoask.info/microsoft-interview-questions/
Go to Top of Page
   

- Advertisement -