You can enter this into PSQL
with line breaks. PSQL
will recognize that the command is not terminated until the semicolon.
White space (i.e., spaces, tabs, and newlines) may be used freely in SQL
commands. That means you can type the command aligned differently than the above, or even all on one line. Two dashes ("--"
) introduce comments. Whatever follows them is ignored up to the end of the line. SQL
is case insensitive about key words and identifiers, except when identifiers are double-quoted to preserve the case (not done above).
specifies a data type that can store arbitrary character strings up to 10 characters in length. NUMBER(7,2)
is a fixed point number with precision 7 and scale 2. NUMBER(4)
is an integer number with precision 4 and scale 0.
supports the usual SQL
data types INTEGER
, DOUBLE PRECISION
, and TIMESTAMP
as well as various synonyms for these types.