Assignment 3 Note: Tables referred in this assignment are same as that of Assignment 2. 1. For each...

60.1K

Verified Solution

Question

Programming

Assignment 3 Note:

Tables referred in this assignment are same as that ofAssignment 2.

1. For each table, append your student id along with the tablename. For e.g. employee_student id (employee_T16363737)

2. Format for questions: a. Question: b. SQL statement solutionc. Screenshot for correct input d. Screenshot for violation (ifany)

Q1) Check the structure of tables.

Q2) Check the constraint name for applied constraints?

Q3) Drop the unique constraint on ENAME

Q4) Drop the Foreign Key constraint on DEPTNO

Q5) Add Foreign Key constraint on DEPTNO

Q6) Change Data type of ENAME. (If previously you have marked itas VARCHAR 2, then make it CHAR or vice versa)

Q7) Change width of DNAME ( For e.g. If you have defined it’ssize has 20 then make it 30)

Q8) Add COMM column in EMP table

Q9) Drop CITY column from S table

Q10) Create duplicate copy of EMP table

Q11) Copy structure of DEPT table in another table withdifferent column names

Q12) Change the name and job of the employee whose EMPNO=100

Q13) Delete the record of employee who belong to computerdepartment

Q14) Drop DEPT Table

Q15) Drop duplicate table of EMP table

Answer & Explanation Solved by verified expert
3.8 Ratings (303 Votes)
1 SELECT FROM INFORMATIONSCHEMACOLUMNS WHERE TABLENAMEtableName for one particular table OR SELECT TABLENAME FROM INFORMATIONSCHEMATABLES it will return all the tables in the database that we are querying 2 SELECT CONSTRAINTNAME    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students