Question: Write an SQL query to create 2 tables DEPT, EMP with the given details DEPT Columns Datatype Size D_ID Varchar2 3 D_Name Varchar2 10 EMP

 Write an SQL query to create 2 tables DEPT, EMP withthe given details DEPT Columns Datatype Size D_ID Varchar2 3 D_Name Varchar210 EMP Columns Datatype Size Constraints E_ID Number 3 Primary Key E_NameVarchar2 15 D_ID Varchar2 3 Foreign key Write an SQL query to

Write an SQL query to create 2 tables DEPT, EMP with the given details DEPT Columns Datatype Size D_ID Varchar2 3 D_Name Varchar2 10 EMP Columns Datatype Size Constraints E_ID Number 3 Primary Key E_Name Varchar2 15 D_ID Varchar2 3 Foreign key Write an SQL query to add 3 records in to the table EMP. E ID E_Name D_ID 222 Ahmed D10 Safa D20 333 Rafa D30 EMP Columns Datatype Size Constraints E_ID Number 3 Primary Key E_Name Varchar2 15 D_ID Varchar2 3 Foreign key Salary Number 8,2 a. Write a SQL query to add constraint CHECK to check Salary >0 with a suitable constraint name (1.5 Marks) b Write an SQL Query to remove the table from the database. (1Mark) EID 222 333 444 555 E Name Ahmed Safa Ahmed Safa EMP DID D10 D20 D30 D10 Salary 200.65 300.50 400.00 Write an SQL query to change employee name Ahmed" as "Mohamed" whose department ID is D10

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!