Question: Create Table House ( hid int NOT NULL, Adrs varchar(100) NOT NULL, zipcode int, Primary Key (hid) ); Insert Into House values (1, '154 corner

Create Table House ( hid int NOT NULL,

Adrs varchar(100) NOT NULL,

zipcode int,

Primary Key (hid) );

Insert Into House values (1, '154 corner St.', 25098); Insert Into House values (2, '2540 Lockwood dr.', 32006); Insert Into House values (3, '345 Minnesota ln.', 45766);

write a PL/SQL

1) first check whether there exists a house with same address and zip code, if so print a message 'this house exist!'

2) otherwise, insert the house into house table and print out new house ID.

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!