SQL III- 7 specifying values
Home > Preview
The flashcards below were created by user
on FreezingBlue Flashcards.
- Using variables to eliminate redundant coding
- Extracting frequently required information from a database table field
- Combining simple values to form complex expressions
SQL recognizes several kinds of values:
- Row values
- Literal values
- Special variables
- Column references
- 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.
SQL has five kinds of value expressions:
- String value expressions
- Numeric value expressions
- Datetime value expressions
- Interval value expressions
- Conditional value expressions
string value expresssions
Numeric value expressions
What would you like to do?
Home > Flashcards > Print Preview