Filters
Question type

Study Flashcards

You cannot use functions in WHERE clauses.

A) True
B) False

Correct Answer

verifed

verified

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


A) INT function
B) FLOOR function
C) ROUND function
D) TRUNCATE function

E) None of the above
F) A) and C)

Correct Answer

verifed

verified

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


A) 15 characters
B) 30 characters
C) 45 characters
D) 60 characters

E) B) and C)
F) A) and D)

Correct Answer

verifed

verified

What are the three major advantages of cursors?

Correct Answer

verifed

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.

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

A) True
B) False

Correct Answer

verifed

verified

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?


A) RETRIEVE
B) FETCH
C) GET
D) ADVANCE

E) All of the above
F) C) and D)

Correct Answer

verifed

verified

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

Correct Answer

verifed

verified

This MySQL procedure that takes a custom...

View Answer

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


A) TRUNCATE
B) FLOOR
C) ROUND
D) TRIM

E) C) and D)
F) B) and D)

Correct Answer

verifed

verified

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


A) TRUNCATE function
B) TRIM function
C) FLOOR function
D) RTRIM function

E) B) and C)
F) C) and D)

Correct Answer

verifed

verified

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


A) MONTHS function
B) ADD_DATE function
C) ADD_MONTHS function
D) CALC_MONTHS function

E) A) and C)
F) B) and C)

Correct Answer

verifed

verified

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


A) REGULAR function
B) LCASE function
C) SMALL function
D) LOWER function

E) B) and D)
F) A) and B)

Correct Answer

verifed

verified

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

A) True
B) False

Correct Answer

verifed

verified

False

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) DELIMITER
B) END
C) OUT
D) STATEMENT

E) B) and C)
F) A) and D)

Correct Answer

verifed

verified

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 _____.


A) calculations
B) concatenation
C) the UPPER function
D) the ALTER TABLE command

E) C) and D)
F) A) and B)

Correct Answer

verifed

verified

B

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


A) CALL
B) RUN
C) DO
D) EXEC

E) A) and B)
F) None of the above

Correct Answer

verifed

verified

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


A) DATEDIFF() function
B) GETDATE() function
C) CURRENTDATE() function
D) SYSDATE function

E) A) and C)
F) A) and B)

Correct Answer

verifed

verified

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


A) cursor procedure
B) retrieval procedure
C) display procedure
D) update procedure

E) A) and D)
F) C) and D)

Correct Answer

verifed

verified

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


A) CAPITAL
B) UPPER
C) LARGE
D) UCASE

E) B) and D)
F) C) and D)

Correct Answer

verifed

verified

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?


A) DECLARE EXIT HANDLER FOR NOT FOUND
B) DECLARE EXIT HANDLER FOR INVALID ARGUMENT
C) ERROR MESSAGE FOR NOT FOUND
D) ERROR MESSAGE FOR INVALID ARGUMENT

E) A) and B)
F) A) and C)

Correct Answer

verifed

verified

Which statement about triggers is correct?


A) In a trigger, the action that should cause the procedure to execute appears between BEGIN and END commands.
B) In SQL Server, you create triggers using T-SQL.
C) In a trigger, the actions the database should perform automatically appear in the AFTER clause.
D) In Oracle, you cannot create triggers.

E) A) and B)
F) A) and C)

Correct Answer

verifed

verified

Showing 1 - 20 of 35

Related Exams

Show Answer