Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all articles
Browse latest Browse all 8500

DB2 :: Query to get 2 rows for each specific column value

$
0
0
Author: Chandan1993
Subject: Query to get 2 rows for each specific column value
Posted: Sun Jun 11, 2017 5:42 pm (GMT 5.5)

Hi All,

i need query to get 2 row for each specific column value.
Ex:
Emp table have 4 column...EmpName,Emp-id,job,Area where primary key is
Emp-id.

In table we are updating other column value in rows for respective primary key (Emp-id)

Lets say we have 5 unique value of Emp-id in Emp table (i.e. 1000,1001,1002,1003,1004)
now i want to select 2 set of rows for each unique Emp-id value.

Thanks in Adv.
Chandan
_________________
Thanks,
Chandan kumar


Viewing all articles
Browse latest Browse all 8500

Trending Articles