Professional Documents
Culture Documents
Sqlpresent
Sqlpresent
//right join
//full join
//self join
//
select * from tblAuthors t,tblBooks tt where t.Id IN(select id from tblBooks where
id<=500)
SELECT t.Author_name,t.country,t.Id,tt.Auhthor_id,tt.Edition,tt.Id,tt.Price
FROM tblAuthors t inner join tblBooks tt ON tt.id<=500
// conditions more
select * from tblAuthors t,tblBooks tt where t.Id IN(select id from tblBooks where
id<=500 and Price <60)
SELECT t.Author_name,t.country,t.Id,tt.Auhthor_id,tt.Edition,tt.Id,tt.Price
FROM tblAuthors t inner join tblBooks tt ON tt.id<=500 and tt.Price<60
//proof exist
//
//
//left join
SELECT t.Author_name,t.country,t.Id
FROM tblAuthors t left join tblBooks tt ON tt.Id=t.Id where tt.id is null
Set @LowerLimitForAuthorId = 1
Set @UpperLimitForAuthorId = 600
Set @LowerLimitForPrice = 50
Set @UpperLimitForPrice = 100
Set @LowerLimitForEdition = 1
Set @UpperLimitForEdition = 10
//