Create employees table with order by and distinct command use in sql by orcal

**employee table create**

 create table employees(id int,name varchar2(10),age int,address varchar2(10),salary int);

insert into employees values(1,'ramesh',32,'ahmedabad',2000);

insert into employees values(1,'khilan',25,'delhi',1500);

insert into employees values(1,'khaushik',23,'kota',2000);

insert into employees values(1,'chitali',25,'mumbai',6500);

insert into employees values(1,'hardik',27,'bhopal',8500);

insert into employees values(1,'komal',22,'mp',4500);

insert into employees values(1,'muffy',24,'indore',9000);

insert into employees values(1,'muffy',23,'chennai',2100);



Query 1*

select salary

from employees

order by salary;



Query2*

select distinct name

from employees;



Query3*

select * from employee

where address='indore';



Query 4*

select id,name,salary

from employees

where salary>2000;



Query 5*

select *from employees

where name='ramesh'or name='khilan';



Query 6*

select *from employees

where address!='bhopal';




Comments

Popular Posts