SQL Select query with conditions | SQL where Clause


--Selection without constraints

--Display All fields of all records in Employee Table
Select * from tabEmployee

--Selecting based on conditions by Where clause

--To select employee list of department 'Training'
select * from tabEmployee where Department='Training'

--To select employee list of department 'Development'
select * from tabEmployee where Department='Development'

--To select employee getting salary greater than 10000
select * from tabEmployee where salary>10000

--To select employee getting salary greater than 10000
select * from tabEmployee where salary>10000

--To select employee record whose department is not confirmed
select * from tabEmployee where Department is null

--To select employee record whose designation is not confirmed
select * from tabEmployee where Designation is null

--To select employee record whose department and designation are confirmed
select * from tabEmployee 
where Designation is not null and Department is not null

No comments:

Post a Comment