Questions from Database Systems


Q: Write the SQL code to delete the row for the person named

Write the SQL code to delete the row for the person named William Smithfield, who was hired on June 22, 2004, and whose job code classification is 500. (Hint: Use logical operators to include all of t...

See Answer

Q: Write the SQL code that will restore the data to its original

Write the SQL code that will restore the data to its original status; that is, the table should contain the data that existed before you made the changes in Problems 5 and 6. ATTRIBUTE (FIELD) NAME ...

See Answer

Q: Write the SQL code to create a copy of EMP_1

Write the SQL code to create a copy of EMP_1, naming the copy EMP_2. Then write the SQL code that will add the attributes EMP_PCT and PROJ_NUM to its structure. The EMP_PCT is the bonus percentage to...

See Answer

Q: Write the SQL code to change the EMP_PCT value to

Write the SQL code to change the EMP_PCT value to 3.85 for the person whose employee number (EMP_NUM) is 103. Next, write the SQL command sequences to change the EMP_PCT values as shown in Figure P7.9...

See Answer

Q: Using a single command sequence, write the SQL code that will

Using a single command sequence, write the SQL code that will change the project number (PROJ_NUM) to 18 for all employees whose job classification (JOB_CODE) is 500. ATTRIBUTE (FIELD) NAME DATA DEC...

See Answer

Q: Using a single command sequence, write the SQL code that will

Using a single command sequence, write the SQL code that will change the project number (PROJ_NUM) to 25 for all employees whose job classification (JOB_CODE) is 502 or higher. When you finish Problem...

See Answer

Q: Write the SQL code that will change the PROJ_NUM to

Write the SQL code that will change the PROJ_NUM to 14 for those employees who were hired before January 1, 1994 and whose job code is at least 501. ATTRIBUTE (FIELD) NAME DATA DECLARATION  EMP_N...

See Answer

Q: Write a query to display the book number, book title,

Write a query to display the book number, book title, and year of publication for every book (See Figure P7.68). FIGURE P7. 68 Title and Year for all Books

See Answer

Q: Write a query to display the different years that books have been

Write a query to display the different years that books have been published in. Include each year only once (See Figure P7.69). FIGURE P7. 69 Unique Book Years

See Answer

Q: Write a query to display the different subjects on which FACT has

Write a query to display the different subjects on which FACT has books. Include each subject only once (See Figure P7.70). FIGURE P7. 70 Unique Book Subjects

See Answer