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

For unmatched rows returned from an outer join, the column values in the other table are set to null e.g If A OUTER JOIN B returns some unmatched rows from A, the corresponding column values in B will be set to null. What can be done so that a null value is not displayed for these columns?

3 Answers  


List down the data types in the db2 database.

0 Answers  


What is a Cartesian product?

2 Answers  


What is rebind in db2?

0 Answers  


what is difference between random and sequence file access

1 Answers   Syntel,






1) I have 3 programs : PGMA, PGMB, PGMC. PGMA calls PGMB and PGMB calls PGMC. I have to do inserts, updates in all the 3 pgms. 2) Say PGMC has done its work successfully and returned to PGMB 3) PGMB had an SQL error while doing some update 4) PGMA has already done some updates before calling PGMB all are running under the same CICS region. What will happen if I issue SYNCPOINT ROLLBACK in PGMB when it abends ? Does all the changes in PGMA,B,C rollback ? (because all the pgms belong to same task).

1 Answers  


How to create backup table in db2?

0 Answers  


What is error -818 in db2. where can you find the timestamp of the DBRM and the source code.( precompile puts the timestamp on dbrm and source code correct?)

2 Answers  


If a table has a column "dept" (declared to have nulls) and there are 10 rows in the table of which 3 have a null value in the dept column, what will select count(*) and select count(distinct dept) return?

6 Answers  


How does one bind 2 versions of a CICS transaction with the same module name in two different CICS regions that share the same DB2 subsystem?

2 Answers  


How would you print the output of an SQL statement from SPUFI?

2 Answers  


If there is no row in Emp table with Ename as Raghava and you run the below queries in SPUFI. 1.select Ename from EMP wher Ename = 'raghava' 2.Select count(*) from EMP where Ename = 'raghava' What is SQLCODE shown up in SPUFI

4 Answers   ADP,


Categories