Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Hcl Technologies 3+ Experienced Sql server Questions

Answers were Sorted based on User's Feedback



Hcl Technologies 3+ Experienced Sql server Questions..

Answer / susmita

6. HOW TO FIND 6TH HIGHEST SALARY?




with ta
as
(
select distinct top 6 salary from tblemp order by salary desc
)
select min(salary) from ta

Is This Answer Correct ?    2 Yes 1 No

Hcl Technologies 3+ Experienced Sql server Questions..

Answer / basha

2)Dispaly all managers from table(Manager id is same as Empid)

select * from employee where empid in
(select distinct mgrid from employee)

Is This Answer Correct ?    0 Yes 0 No

Hcl Technologies 3+ Experienced Sql server Questions..

Answer / sahil chawla

Select MIN(s.salary) FROM
(SELECT salary FROM Employee ORDER BY salary DESC limit 6)s

Is This Answer Correct ?    0 Yes 0 No

Hcl Technologies 3+ Experienced Sql server Questions..

Answer / daisy

1) select all the Employees who does not have phone?

select * from employees where empid not in (select empid
from phone)

2)Dispaly all managers from table(Manager id is same as
Empid)

select * from employees emp where emp.employeeid = emp.mgrid

3)How to know How many tables contain Empno as a column in
database?

4)Find duplicate rows in a table or if we have table with
one column which
has many records which are not distinct. How to find out
the distinct
values from that column and number of times it's repeated?

select salary,count(salary) as Repeat from employees group
by salary having salary > 1

5) How to delete the rows which are duplicate?(Don't remove
both duplicate
records.)
WITH [T ORDERED BY ROWID] AS

(SELECT ROW_NUMBER() OVER (ORDER BY product_name ASC) AS
ROWID, * FROM product where product_name ='Scale')

DELETE FROM [T ORDERED BY ROWID] WHERE ROWID <> 1

6)How to find the 6th highest salary?

SELECT TOP 1 salary

FROM (

SELECT DISTINCT TOP 6 salary

FROM employee

ORDER BY salary DESC) a

ORDER BY salary

Is This Answer Correct ?    14 Yes 15 No

Hcl Technologies 3+ Experienced Sql server Questions..

Answer / kotesh

6)How to find the 6th highest salary?

select level,max(salary)
from employee
where level=6
connect by prior salary >salary
group by level;

Is This Answer Correct ?    7 Yes 8 No

Hcl Technologies 3+ Experienced Sql server Questions..

Answer / anil babu

How to find the 6th highest salary?


select s.salary from
(select ROW_NUMBER() over (order by salary desc) as sno,Empid,salary from tbl_Emp )s where sno=6

Is This Answer Correct ?    0 Yes 1 No

Hcl Technologies 3+ Experienced Sql server Questions..

Answer / sabarinathan

HOW TO FIND 6TH HIGHEST SALARY?

SELCT * FROM(
SELECT *,RANK() OVER(ORDER BY SALARY) RN FROM TBLSALARY) S
WHERE RN=6

Is This Answer Correct ?    1 Yes 2 No

Hcl Technologies 3+ Experienced Sql server Questions..

Answer / sabarinathan

How many tables contain Empno as a column in database?

select count(*) from database.sys.columns where name='comp_id'

Is This Answer Correct ?    1 Yes 2 No

Hcl Technologies 3+ Experienced Sql server Questions..

Answer / pasha

How to find sixth highest salary?

--count number of rows first

select count(salary) from employee

select salary from employee where salary=(select max(salary)
from (select top 6 salary from (select top 6 salary from
employee order by salary asc) b order by salary asc) c)

Is This Answer Correct ?    0 Yes 3 No

Hcl Technologies 3+ Experienced Sql server Questions..

Answer / noopur shrivastava

delete empid from employee e ,phone p where e.rowid !=
p.rowid;

Is This Answer Correct ?    8 Yes 16 No

Post New Answer

More Placement Papers Interview Questions

TATA ELXSI

2 Answers   TATA,


INFOSYS @ UIT - RGPV BHOPAL

1 Answers   Infosys, Tech Mahindra,


thought works

5 Answers   Infosys, Thought Works,


Tcs Freshers Interview On 27 jan 2007 In Hyderabad.

1 Answers   TCS,


Cadance placement papers --------- placement paper

1 Answers   Cadence,


Broadcom placement papers

2 Answers   Broadcom,


Allahabad bank Computer test

1 Answers   Allahabad Bank,


Couls anyone please tell me the kind of questions which will be asked for ONGC Programming discipline.No idea about the programming questions.Which programming language will be asked...please do send a previous placement paper for programming as well

3 Answers   ONGC,


PHILIPS PLACEMENT PAPERS

1 Answers   Philips,


Verifone PLACEMENT PAPERS ------ Verifone Placement Paper 5

1 Answers   Verifone,


bank po exam

2 Answers  


analytical ability,numerical ability,numberseries,letter series,abstract reasoning,sentence completion

1 Answers   HCL,


Categories