OWNER ( OwnerID, OwnerName, OwnerEmail, OwnerType ) PROPERTY ( PropertyID, Prope
ID: 3680699 • Letter: O
Question
OWNER ( OwnerID, OwnerName, OwnerEmail, OwnerType )
PROPERTY ( PropertyID, PropertyName, Street, City, State, Zip,OwnerID)
EMPLOYEE ( EmployeeID, LastName, FirstName, CellPhone, ExperienceLevel )
SERVICE ( PropertyID, EmployeeID, ServiceDate, HoursWorked )
Assume that there are no cascading deletes between any of the above tables, write the fewest number of DELETE statements possible to remove all the data in your database but leave the table structures intact. After the query, you will see the contents of each of the tables.
Explanation / Answer
OWNER ( OwnerID, OwnerName, OwnerEmail, OwnerType )
PROPERTY ( PropertyID, PropertyName, Street, City, State, Zip,OwnerID)
EMPLOYEE ( EmployeeID, LastName, FirstName, CellPhone, ExperienceLevel )
SERVICE ( PropertyID, EmployeeID, ServiceDate, HoursWorked )
you can use various Queries here ->
delete from Table_name OR
TRUNCATE TABLE Table_name
for OWNER
delete from OWNER
or
TRUNCATE TABLE OWNER
for PROPERTY
delete from PROPERTY
or
TRUNCATE TABLE PROPERTY
for EMPLOYEE
delete from EMPLOYEE
or
TRUNCATE TABLE EMPLOYEE
for SERVICE
delete from SERVICE
or
TRUNCATE TABLE SERVICE
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.