Questions from Database Systems


Q: What Oracle function should you use to calculate the number of days

What Oracle function should you use to calculate the number of days between the current date and January 25, 1999?

See Answer

Q: Suppose that a PRODUCT table contains two attributes, PROD_CODE

Suppose that a PRODUCT table contains two attributes, PROD_CODE and VEND_CODE. Those two attributes have values of ABC, 125, DEF, 124, GHI, 124, and JKL, 123, respectively. The VENDOR table contains a...

See Answer

Q: What string function should you use to list the first three characters

What string function should you use to list the first three characters of a company’s EMP_LNAME values? Give an example, using a table named EMPLOYEE.

See Answer

Q: What is a sequence? Write its syntax.

What is a sequence? Write its syntax.

See Answer

Q: Modify the query in Problem 30 to include the number of individual

Modify the query in Problem 30 to include the number of individual product purchases made by each customer. (In other words, if the customer’s invoice is based on three products, one...

See Answer

Q: What is a trigger, and what is its purpose? Give

What is a trigger, and what is its purpose? Give an example.

See Answer

Q: What is a stored procedure, and why is it particularly useful

What is a stored procedure, and why is it particularly useful? Give an example.

See Answer

Q: What is embedded SQL, and how is it used?

What is embedded SQL, and how is it used?

See Answer

Q: What is dynamic SQL, and how does it differ from static

What is dynamic SQL, and how does it differ from static SQL?

See Answer

Q: What is a CROSS JOIN? Give an example of its syntax

What is a CROSS JOIN? Give an example of its syntax.

See Answer