105k views
1 vote
Which one of the following is not true when functions are used in sql statements?

a. must be a stored database object
b. cannot issue alter session or alter system commands
c. return data types must be a database data type
d. can use only out parameters

1 Answer

6 votes

Final answer:

The false statement about SQL functions is that they can use only out parameters. Functions in SQL cannot have out parameters but do return data types recognized by the database and must be stored as database objects.

Step-by-step explanation:

The statement that is not true when functions are used in SQL statements is: can use only out parameters. In SQL, functions can have input parameters that allow you to pass data into them, but they cannot have out parameters in the same way that stored procedures can. Out parameters are used with procedures to return values to the caller, whereas functions return a single value directly.

Functions must be stored in the database (must be a stored database object), and they indeed do return data types that are recognized by the database (return data types must be a database data type). However, functions are not allowed to issue commands that change the database environment or the database itself, such as alter session or alter system (cannot issue alter session or alter system commands).

User Joelio
by
8.6k points