1.
Consider the following table:
(a) To show all information about the patients of cardiology department.
(b) To list the names of female patients who are in orthopedic dept.
(c) To list names of all patients with their date of admission in ascending order.
(d) To display Patient's Name, Charges, age for male patients only.
(e) To display the patient's name end with A.
2.
Write SQL commands for (b) to (g) and write output for(h).
(a) To show all information about the employees of Engg. Branch.
(b) To list the names of female employees who are in Science branch
(c) To list the names of all employees with their date of retirement in ascending order.
(d) To display Employee's name, Salary, Age for male employees only
(e) To insert a new row in the EMPLOYEE table with the following data:
9."Rohit", 46,"language", (22/06/98),2300,"M"
3. Write the difference between Primary key and Foreign key.
4. Write the difference between Update and Alter.
5. Name the DDL and DML commands.
6. Write the difference between char and varchar;
7. Write the difference between delete and drop.
8. Explain the various constraints in DBMS.
a)SELECT FROM hospital WHERE department Cardiology";
b)SELECT name FROM hospital WHERE sex-'F' AND department='Orthopedic';
c)SELECT name, dateofadm FROM hospital ORDER BY dateofadm;
d)SELECT name, charges, age FROM hospital WHERE sex='M';
e) SELECT name from hospital where name like 'A%';
2. a)SELECT FROM employee WHERE branch= 'Engg.';
b) SELECT name FROM employee WHERE sex 'F' AND branch 'Science';
c) SELECT name, dateofrtd FROM employee ORDER BY dateofrtd;
d) SELECT name, salary, age FROM employee WHERE sex 'M';
e) INSERT INTO employee VALUES (9, 'Rohit', 46, 'Language', '22/06/98',2300, M');