Multiple choice technology databases

Which of the following statements is NOT true of local variables?

  1. Their name must begin with @

  2. They are local to the batch or stored procedure where they are declared

  3. They can be declared in a select statement

  4. They cannot have a datatype of text or image

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Local variables in Sybase must begin with the @ symbol (option A is true). They are local to the batch or stored procedure where declared (option B is true). They cannot have text or image datatypes (option D is true). Option C is NOT true - variables cannot be declared in a SELECT statement. They must be declared using the DECLARE statement before being used in SELECT or other statements.