Exam 8: Functions Procedures and Triggers
What are the three major advantages of cursors?
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 _____.
B
In SQL Server, you use the & symbol to concatenate columns.
False
Which function displays a value in uppercase letters in Oracle and SQL Server?
In Oracle, to add a specific number of months to a date, use the _____.
Which function can you use in Oracle, MySQL, and SQL Server to truncate everything to the right of the decimal point?
In MySQL, Oracle, and SQL server, you can display a value in lowercase letters using the _____.
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?
To remove extra spaces to the right of a value after concatenating two or more columns, use the _____.
When you need to complete tasks that are beyond the capabilities of SQL, you need to use a procedural language.
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?
A stored procedure that includes an UPDATE command between the BEGIN and END commands is known as a(n) _____.
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?
In SQL Server, you can obtain today's date using the _____.
Variable names in PL/SQL must start with a letter and can contain letters, dollar signs, underscores, and number signs, but cannot exceed _____.
Identify and explain the error handling strategy used in the following procedure.
In Oracle, SQL Server, and MySQL, you can round a numeric value to a desired number of decimal places using the _____.
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)