Advertisement
Warmachine28

Untitled

Jan 24th, 2022
1,234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.64 KB | None | 0 0
  1. create table employee(
  2.     Sno int primary key not null auto_increment,
  3.     emp_id bigint,
  4.     emp_name varchar(255),
  5.     emp_dept varchar(255),
  6.     emp_salary int,
  7.     emp_city varchar(255)
  8. );
  9. select * from employee where emp_city = 'Noida' or emp_city = 'New Delhi';
  10. update employee set emp_salary = emp_salary + emp_salary*0.2 where emp_city = 'Greater Noida';
  11. select * from employee where emp_name = 'Akash' or emp_id = 12116491214;
  12. select * from employee where emp_salary in (select max(emp_salary) from employee where emp_dept = 'ECE') and emp_dept = 'ECE';
  13. select * from employee where emp_city <> 'New Delhi' and emp_city <> 'Gurgaon';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement