Exam 8: Functions Procedures and Triggers

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

What are the three major advantages of cursors?

Free
(Essay)
4.7/5
(34)
Correct Answer:
Verified

The coding in the procedure is greatly simplified. Normally in a program, the programmer must determine the most efficient way to access the data. In a program or procedure using embedded SQL, the optimizer determines the best way to access the data. The programmer isn't concerned with the best way to retrieve the data. In addition, when an underlying structure changes (for example, an additional index is created), the optimizer determines the best way to execute the query with the new structure. The program or procedure does not have to change at all. When the database structure changes in such a way that the necessary information is still obtainable using a different query, the only change required in the program or procedure is the cursor definition. The procedural code is not affected.

Displaying a full name in query results when the first and last names are stored in separate columns in the database table is a typical use case for _____.

Free
(Multiple Choice)
4.9/5
(36)
Correct Answer:
Verified

B

In SQL Server, you use the & symbol to concatenate columns.

Free
(True/False)
4.8/5
(33)
Correct Answer:
Verified

False

You cannot use functions in WHERE clauses.

(True/False)
5.0/5
(35)

Which function displays a value in uppercase letters in Oracle and SQL Server?

(Multiple Choice)
4.8/5
(36)

In Oracle, to add a specific number of months to a date, use the _____.

(Multiple Choice)
4.9/5
(39)

Which function can you use in Oracle, MySQL, and SQL Server to truncate everything to the right of the decimal point?

(Multiple Choice)
4.8/5
(39)

In MySQL, Oracle, and SQL server, you can display a value in lowercase letters using the _____.

(Multiple Choice)
4.9/5
(27)

Which of the following statements can you add to a stored procedure to provide meaningful feedback to a user who attempts to execute the procedure with an argument that is invalid because it is missing from the table column being queried?

(Multiple Choice)
4.8/5
(42)

To remove extra spaces to the right of a value after concatenating two or more columns, use the _____.

(Multiple Choice)
4.8/5
(40)

When you need to complete tasks that are beyond the capabilities of SQL, you need to use a procedural language.

(True/False)
4.7/5
(44)

When you execute a stored procedure to retrieve a single row with embedded SQL, you need MySQL to treat several statements ending in a semicolon as if they were a single statement. What keyword do you use to tell MySQL to use a different character to signal the end of a statement in this situation?

(Multiple Choice)
4.9/5
(30)

A stored procedure that includes an UPDATE command between the BEGIN and END commands is known as a(n) _____.

(Multiple Choice)
4.8/5
(39)

When you use a cursor in a procedure, what command advances the cursor to the next row in the set of rows retrieved by the query and places the contents of the row in the indicated variables?

(Multiple Choice)
4.8/5
(36)

In SQL Server, you can obtain today's date using the _____.

(Multiple Choice)
4.9/5
(40)

Which command is used to call a procedure in SQL Server?

(Multiple Choice)
4.9/5
(39)

Variable names in PL/SQL must start with a letter and can contain letters, dollar signs, underscores, and number signs, but cannot exceed _____.

(Multiple Choice)
4.9/5
(38)

Identify and explain the error handling strategy used in the following procedure.

(Essay)
4.8/5
(39)

In Oracle, SQL Server, and MySQL, you can round a numeric value to a desired number of decimal places using the _____.

(Multiple Choice)
4.9/5
(32)

Which statement about triggers is correct?

(Multiple Choice)
4.9/5
(47)
Showing 1 - 20 of 35
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)