elumalai.k


{ City } chennai
< Country > india
* Profession * software developer
User No # 12748
Total Questions Posted # 9
Total Answers Posted # 13

Total Answers Posted for My Questions # 31
Total Views for My Questions # 58365

Users Marked my Answers as Correct # 114
Users Marked my Answers as Wrong # 129
Questions / { elumalai.k }
Questions Answers Category Views Company eMail

Is it possible to allow NULL values in foreign key? I s it possible to use different constraints for the same column in the table (i.e) (id int NOT NULL,UNIQUEUE)

1 SQL Server 8880

is it possible to set more than web.config file for an ASP.net APPLICATION?can it run?how is it possible

3 ASP.NET 5807

IS IT POSSIBLE TO SET TIME FOR COOKIES?HOW IT IS POSSIBLE.

1 ASP.NET 3328

I Have Employee table having column name as ID,SALARY how to get second max salary from employee table with id ex ID SALARY 1 20000 7 37000 2 5000

HCL, IBM,

17 SQL Server 16843

employee table has employee id ----------- empid ---------------- 1 2 3 3 3 4 5 5 5 6 6 6 7 here the values r repeated two times.how to select the repeated values only.i.e 3,5,6 should alone come.

3 SQL Server 6678

Is it VB.NET support multiple inheritance?

Zylog,

2 Engineering AllOther 4080

WHAT IS THE NAMESPACE FOR CUSTOMCONTROL AND USER CONTROL IN ASP.NET?

Zylog,

Engineering AllOther 1633

Is it VB.NET support operator overloading?

Zylog,

3 Engineering AllOther 4798

what are the aggregate functions in ASP.NET?

CTS, IBM, Zylog,

1 Dot Net Framework 6318




Answers / { elumalai.k }

Question { 16658 }

How do you find the number of rows in a table?


Answer

select @@rowcount
select count(*) from tablename

Is This Answer Correct ?    5 Yes 7 No

Question { IBM, 157480 }

how to find nth highest salary


Answer

select salary from tablename t1
where n=(select count(*)from tablename t2
where t1.salary<=t2.salary)

Is This Answer Correct ?    16 Yes 16 No


Question { Accenture, 8668 }

Tell something about state management in asp.net?


Answer

SERVER SIDE:
1.APPLICATION
2.CACHE
3.SESSION
4.CONTEXT
5.DATABASE

CLIENT SIDE:
1.VIEW STATE
2.COOKIES
3.HIDDEN VARIABLES
4.QUERY STRING

Is This Answer Correct ?    15 Yes 2 No

Question { IBM, 24783 }

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


Answer

select max(salary)from tablename where salary <(select
max(salary)from tablename)

Is This Answer Correct ?    1 Yes 0 No

Question { Medi Assist, 65303 }

write the query for find the top 2 highest salary in sql
server


Answer

select max(salary)from emp where salary <(select sum(salary)
from emp)

Is This Answer Correct ?    6 Yes 12 No

Question { IBM, 16549 }

a query to select maxmun 3 salaries of employee table


Answer

select top 3 salary from employee order by salary desc

Is This Answer Correct ?    5 Yes 7 No

Question { Systematix, 25829 }

is there more the two primary key in a single table?


Answer

No it is not possible.
A table has only one primary key
If the table has more than one primary key is called
composite key.

Is This Answer Correct ?    3 Yes 1 No

Question { Mind Tree, 20409 }

write query for fourth maximum salary from employee table


Answer

select salary from employee aa
where 4=(select count(*)from employee bb
where aa.salary<=bb.salary)

Is This Answer Correct ?    4 Yes 4 No

Question { 15690 }

How do we rollback the table data in SQL Server


Answer

begin transaction
save transcation t
delete from tablename where id=2
select * from tablename
------------------------------------------------------
the value id=2 will be deleted in the tablename
-------------------------------------------------------
rollback transcation t
select * from tablename
---------------------------------------------------------
if u give rollback the deleted values will be seen again

Is This Answer Correct ?    22 Yes 3 No

Question { 5757 }

one table has four field id,name,design,salary. i have to
find maximum salary .


Answer

select max(salary) from tablename

Is This Answer Correct ?    4 Yes 0 No

Question { IBM, 16843 }

I Have Employee table having column name as ID,SALARY
how to get second max salary from employee table with id
ex
ID SALARY
1 20000
7 37000
2 5000


Answer

select id,max(salary)from employee where salary<(select
max(salary)from employee)

Is This Answer Correct ?    15 Yes 6 No

Question { IBM, 16843 }

I Have Employee table having column name as ID,SALARY
how to get second max salary from employee table with id
ex
ID SALARY
1 20000
7 37000
2 5000


Answer

select top1 id,salary from employee
where
(salary<(select max (salary) As sal from employee As Empp))
orderby salary desc.

Is This Answer Correct ?    5 Yes 0 No

Question { Intelenet, 30242 }

How to delete particular value in the column of a table.Is
it possible or not?if possible give it as in query.


Answer

delete from tablename where columnname=datatype
examples:
delete from employee where employeeid=2

Is This Answer Correct ?    13 Yes 71 No