ramprasad reddy


{ City } hyderabad
< Country > india
* Profession * b.e fresher
User No # 21517
Total Questions Posted # 0
Total Answers Posted # 3

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 0
Users Marked my Answers as Wrong # 0
Questions / { ramprasad reddy }
Questions Answers Category Views Company eMail




Answers / { ramprasad reddy }

Question { TCS, 39558 }

what is the output of the query select * from emp where 1=2


Answer

it will display all the columns

Is This Answer Correct ?    0 Yes 0 No

Question { IBM, 25061 }

can anybody tell us, how to select 2nd max salary from
table.
my id is ashish.akk@gmail.com


Answer

with x as(select row_number over(order by sal desc) as rid,* from emp)
select * from x where rid=n
we can retrieve nth max sal

Is This Answer Correct ?    0 Yes 0 No


Question { Accenture, 6106 }

how can i lock the column in the table


Answer

create trigger trigger_name1
on emp
for update
as
begin
if update(ename)
begin
begin tran
raiserror('cannot update column name',16,1)
rollback tran
end
else
print 'table updated'

end

Is This Answer Correct ?    0 Yes 0 No