Remo
Remo

Reputation: 3

Oracle Query - retrieve the next row

I am looking to retrieve records based on condition For eg if there is a table with 4 cols emp_id, emp_name,emp_sqc_num & emp_status. Say the status has values 1 & 2. If there is only one record the emp_sqc_num will be 1 and status will be 1. If there are two records, then for emp_sqc_num 1 the status will be 2 and emp_sqc_num 2 the status will be 1. Now I want to retrieve emp_id, emp_name,emp_sqc_num only for status with 1.

Upvotes: 0

Views: 71

Answers (1)

IteratioN7T
IteratioN7T

Reputation: 356

use the where clause to retrieve data with status 1

SELECT emp_id,emp_name,emp_sqc_num
FROM employee_table
WHERE emp_status=1;

Upvotes: 1

Related Questions