SQL III- 7 specifying values

The flashcards below were created by user dau108 on FreezingBlue Flashcards.

  1. Specifying Values
    • 􏱦 Using variables to eliminate redundant coding
    • 􏱦 Extracting frequently required information from a database table field
    • 􏱦 Combining simple values to form complex expressions
  2. values
    SQL recognizes several kinds of values:

    • 􏰏 Row values
    • 􏰏 Literal values
    • 􏰏 Variables
    • 􏰏 Special variables
    • 􏰏 Column references

    Image Upload 1
  3. special variables:

    • 􏰏 SESSION_USER: The special variable SESSION_USER holds a value that’s
    • equal to the user authorization identifier of the current SQL session. If you write a program that performs a monitoring function, you can interrogate SESSION_USER to find out who is executing SQL statemen
    • 􏰏 CURRENT_USER: An SQL module may have a user-specified authorization identifier associated with it. The CURRENT_USER variable stores this value. If a module has no such identifier, CURRENT_USER has the same
    • value as SESSION_USER.
    • 􏰏 SYSTEM_USER: The SYSTEM_USER variable contains the operating system’s user identifier. This identifier may differ from that user’s identifier in an SQL module. A user may log onto the system as LARRY, for example, but identify himself to a module as PLANT_MGR. The value in
    • SESSION_USER is PLANT_MGR. If he makes no explicit specification of the module identifier, and CURRENT_USER also contains PLANT_MGR,
    • SYSTEM_USER holds the value LARRY.
    • Image Upload 2
  4. values expression
    SQL has five kinds of value expressions:

    • 􏰏 String value expressions
    • 􏰏 Numeric value expressions
    • 􏰏 Datetime value expressions
    • 􏰏 Interval value expressions
    • 􏰏 Conditional value expressions
  5. string value expresssions
    Image Upload 3
  6. Numeric value expressions
    Image Upload 4
Card Set
SQL III- 7 specifying values
SQL III- 7 specifying values
Show Answers