HPlogo ALLBASE/SQL Reference Manual: HP 9000 Computer Systems > Chapter 8 Expressions

Constant

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

A constant is a specific numeric, character, or hexadecimal value.

Scope

SQL Data Manipulation Statements

SQL Syntax

  { IntegerValue
    FloatValue
    FixedPointValue
    'CharacterString'
    OxHexadecimalString}

Parameters

IntegerValue

is a signed or unsigned whole number compatible with INTEGER or SMALLINT data types, for example:

   -16746
      155
        5
FloatValue

is a signed or unsigned floating point number compatible with the FLOAT or REAL data types, for example:

   .2E-4
FixedPointValue

is a signed or unsigned fixed-point number compatible with the DECIMAL data type, for example:

     -15.99
   +1451.1
CharacterString

is a character string compatible with CHAR, VARCHAR, DATE, TIME, DATETIME, or INTERVAL data types. String constants are delimited by single quotation marks, for example:

   'DON''T JUMP!'

However, two single quotation marks in a row are interpreted as a single quotation mark, not as string delimiters.

HexadecimalString

is a string of hexadecimal digits 0 through 9 and A through F (the lowercase a through f are also accepted) compatible with the BINARY and VARBINARY data types. A HexadecimalString constant must be prefaced with the characters 0x, for example:

   0xFFFAB0880088343330FFAA7
   0x000V001231
Feedback to webmaster