create database sylix;
create table income
(
stu_id int,
stu_name varchar(30),
payment int,
fixedamt int,
amtpaid int
);
create table studentdetails
(
stu_id int,
degree varchar(10),()
address varchar(20),
phoneno int
);
create table trainingdetails
(
stu_id int,
proj_1 varchar(20),
proj_2 varchar(20),
proj_3 varchar(20)
);
select * from income;
select * from studentdetails;
select * from trainingdetails;
insert into studentdetails values ('001','bsc','cbe','23565');
insert into studentdetails values ('002','mca','tn','12345');
insert into studentdetails values ('003','Msc','mettu','45678');
select distinct stu_id, degree from studentdetails;
update studentdetails set stu_id='5' where degree='Msc';
delete from studentdetails where stu_id='4';
insert into studentdetails values ('001','BA','me','1324');
insert into studentdetails values ('003','Mphil','salem','454868');
select * from studentdetails where stu_id='3';
insert into studentdetails values ('003','Msc','salem','45678');
select * from studentdetails where stu_id='3' OR address='tn';
select stu_id,degree from studentdetails order by stu_id DESC;
select degree from studentdetails where degree like 'M%a';
select phoneno as mobileno from studentdetails;
update studentdetails set stu_id='5' where address='mettu';
insert into income values ('1','shalini','1000','2000','1000');
insert into income values ('2','rahul','2000','3000','2000');
insert into income values ('3','sanjay','3000','4000','3000');
select * from income;
select * from studentdetails;
select
income.stu_name,studentdetails.degree,income.amtpaid,studentdetails.phoneno
from income
FULL OUTER JOIN studentdetails
ON income.stu_id=studentdetails.stu_id;