i have an employment table whch has salary,dept,name? i want
salary b/w 1000 to 5000 can anyone pls say the query for ths ?

Answers were Sorted based on User's Feedback



i have an employment table whch has salary,dept,name? i want salary b/w 1000 to 5000 can anyone pl..

Answer / deepak

Select * from employment table where salary between 1000 to
50000

Is This Answer Correct ?    25 Yes 7 No

i have an employment table whch has salary,dept,name? i want salary b/w 1000 to 5000 can anyone pl..

Answer / yuvaevergreen

select * from employment where salary between 1000 and 5000

Is This Answer Correct ?    17 Yes 1 No

i have an employment table whch has salary,dept,name? i want salary b/w 1000 to 5000 can anyone pl..

Answer / prasanna

select *from emp where salary between 1000 to 50000

Is This Answer Correct ?    9 Yes 7 No

i have an employment table whch has salary,dept,name? i want salary b/w 1000 to 5000 can anyone pl..

Answer / dinesh

option 1:
Select * from empoyment table where salary >=1000 and <=50000

option 2:
select * from employment table where salary between 10000 and 50000

Is This Answer Correct ?    4 Yes 3 No

i have an employment table whch has salary,dept,name? i want salary b/w 1000 to 5000 can anyone pl..

Answer / vaneesh khurana

Hi All

See the ques properly, he wants rows with salary bwtween
1000 to 5000. If one say between, it wont means inculsion
of 1000 and 5000 thus query will be

select * from employee where salary bwtween 1001 and 4999

Is This Answer Correct ?    0 Yes 1 No

i have an employment table whch has salary,dept,name? i want salary b/w 1000 to 5000 can anyone pl..

Answer / rabindra mishra

Select * from employment table where salary >= 1000 and
>= 50000

It will work Faster then all the above queries

Is This Answer Correct ?    5 Yes 7 No

i have an employment table whch has salary,dept,name? i want salary b/w 1000 to 5000 can anyone pl..

Answer / dd

select salary from employment
where sal between 1000 and 5000

Is This Answer Correct ?    1 Yes 3 No

i have an employment table whch has salary,dept,name? i want salary b/w 1000 to 5000 can anyone pl..

Answer / venu

Select * from employment table where salary between 1000 to
50000

Is This Answer Correct ?    4 Yes 8 No

Post New Answer

More DB2 Interview Questions

What is db2?

0 Answers  


Which catalog table stores referential constraints?

1 Answers  


in the CURSOR declare statement, if i am using an where clause and trying to compare the value with a host-varialble. EXEC SQL DECLARE C1 CURSOR FOR SELECT DEPTNO, DEPTNAME, MGRNO FROM DEPARTMENT WHERE ADMRDEPT = :ADM-DEPT Where would i need to provide value to this host-variable in the where clause. how could i pass value to this host-variable to check it.

2 Answers   iGate,


What is the physical storage length of time data type?

0 Answers  


how to fetch multiple records without using cursor

14 Answers   HCL,






What value the host varible will contain , if null indicator value is -2 ? Will it contain the truncated value or nothing will move ?

3 Answers   Cap Gemini,


What r the comman abends in db2, jcl and cobol???????

0 Answers   Mphasis,


what is the difference between where clause and having clause

2 Answers   IBM,


What is check constraint. Explain with example.

0 Answers  


we can code COPY DCLGEN or INCLUDE DCLGEN, At which stage of the precompilation , dclgen get expanded if we write 1) copy 2) include one question about dclgen.. Is it mandatory to use declare table in dclgen.. I think no...but it will be used by the precompiler to validate the table name,column name etc.., can one clear my doubt ..is it necessary to include declare table or not?

2 Answers  


what is the name of the default db2 catalog database?

3 Answers   IBM,


What is cursor stability?

1 Answers  


Categories