2. insert into sailors values (1,'sakshi',5,18),(2,'arun',4,45),
(3,'kushal',4,55),(4,'tanisha',3,59); insert into boats values (101,'ship','blue'), (102,'yacht','white'),(103,'cruise','pink'),(104,'raft','yellow');
insert into reserves values (2,102,10),(4,104,7),(1,101,6),
(3,101,4);
3. 1 - select s_name from sailors where age between 50 and 60;
2 - select b_name from boats where color = ‘blue’; 3 - select b_name from boats where b_id in(select b_id from reference where s_id = '1'); 4 - select avg(age) from sailors group by rating; 5 - select s_name from sailors where age > (select avg(age) from sailors);
4. Write disadvantages of natural join?
SET B
1. create table customer(c_id int,c_name
char(20),annual_revenew int,primary key(c_id));
create table truck(truck_no int,driver_name
char(30),primary key(truck_no));
create table city(city_name char(30),population
int,primary key(city_name));
create table shipment(shipment_no int primary key,weight
3. 1 - select shipment_no from shipment where weight>20;
2 - select c_name from customer where annual_revenew not in(10000,20000,30000); 3 - select avg(weight)from shipment; 4 - select shipment_no from shipment where truck_no in(select truck_no from truck where driver_name= 'ramesh');
4. Write disadvantages of outer join?
Ans. There are two main limitations of OUTER JOINS in DB2.
The WHERE clause of OUTER JOIN can only have ‘=’ relational operator. <,>, etc are not allowed in case of OUTER JOIN of two or more tables. Also two or more conditions in WHERE clause can only be used with AND logical operator, other logical operators such as OR, NOT is not allowed. The functions to handle NULL operators such as VALUE and COALESCE could not be used with the OUTER JOINS.
Learn Python Programming for Beginners: Best Step-by-Step Guide for Coding with Python, Great for Kids and Adults. Includes Practical Exercises on Data Analysis, Machine Learning and More.
Microsoft 365 Guide to Success: 10 Books in 1 | Kick-start Your Career Learning the Key Information to Master Your Microsoft Office Files to Optimize Your Tasks & Surprise Your Colleagues | Access, Excel, OneDrive, Outlook, PowerPoint, Word, Teams, etc.
Microsoft Excel Guide for Success: Transform Your Work with Microsoft Excel, Unleash Formulas, Functions, and Charts to Optimize Tasks and Surpass Expectations [II EDITION]
Microsoft PowerPoint Guide for Success: Learn in a Guided Way to Create, Edit & Format Your Presentations Documents to Visual Explain Your Projects & Surprise Your Bosses And Colleagues | Big Four Consulting Firms Method