Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Databases Object Oriented Deductive Hypermedia Technologies

Authors: Kamran Parsaye, Mark Chignell, Setrag Khoshafian, Harry Wong

1st Edition

0471503452, 978-0471503453

More Books

Students also viewed these Databases questions

Question

In Problem, find the second derivative. g (x) = x 3 - 1/x

Answered: 1 week ago

Question

Question What is the advantage of a voluntary DBO plan?

Answered: 1 week ago

Question

Question How is life insurance used in a DBO plan?

Answered: 1 week ago