p
SQL
create table staff(
name varchar(10),
id varchar(5) primary key,
department varchar(15),
salary numeric (8),
location varchar(16)
);
insert into staff values('Amit', 'S1' ,'Sales', 20000 ,'KOL');
insert into staff values('Binay', 'S2', 'Sales', '20000', 'DEL');
insert into staff values('Anil', 'H1' ,'HR', '30000', 'KOL');
insert into staff values('Anil', 'H2', 'HR', '35000', 'KOL');
insert into staff values('Asmit', 'S3', 'Sales', 25000 ,'KOL');
insert into staff values('Arun', 'A1', 'Accounts' ,28000, 'DEL');
insert into staff values('Arjun', 'A2', 'Accounts', 40000 ,'DEL');
select * from staff where department = 'Sales';
select id,name from staff;
select name,id,salary from staff where department = 'Accounts';
update staff set location = 'CHN' where location = 'DEL';
select * from staff;
select name, id from staff where location = 'kol' and salary > 25000 ;
Output
Embed on website
To embed this program on your website, copy the following code and paste it into your website's HTML:
Comments
This comment belongs to a banned user and is only visible to admins.
This comment belongs to a deleted user and is only visible to admins.