Hcl Technologies 3+ Experienced Sql server Questions
Answer Posted / 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 |
Post New Answer View All Answers
my question is : reverse a string in COBOL program (please write a code asap) input file: 1234abcdef abc*$#1___ cdef____ghi a_z_k_h___ 4_3_2_1___ ______5678 output file: 8765_____ 1_2_3_4__ h_k_z_a__ ihg____ghi 1#$*cba__ fedcb4321
printf("%d",printf("%d",printf("%d",printf("%s","ILOVECPROGRAM")))); whats the output
What kind of Issues/bugs arise in ETL projects? I would like to know few issues (critical to somewhat bugs ) normally occur in ETL process especially when testing? Domains can be banking, retail or any.
what is placement paper?
A frog wants to climb a pole which is 15 feet in height, frog can jump 3 feet every minute after which he rests for a minute where he slips down 2 feet. How much time will the frog take to reach the top of the pole?
why didn't get placed so far?
Danlaw placement questions and answers
i want the sample placement paper of goldman sachs urgently. please send it to me
what you will do when you struck in traffic ?
Do we have vacancy for HR RECRUITER ?
Hi.. Guys Im pranitha, presently im working in a organisation & im look for job at MNC's like DELL, Delloitte, Bank of America, Genpect, etc., I have completed B.com . Pls help me...
what is bidirectional?
email me previous question papers of bob bank for po exams
HI SIR I WANT PREVIOUS QUESTION PAPER OF HPCL I M CHEMICAL ENGG.
speak 1min on topic Travelling,memorable moment ,memorable day?