Next Prev Up Top Contents Index

16.5.1.1 Enclosing database identifiers

Database identifiers can be enclosed in the square bracket syntax as shown in the following examples.

[foo] => #<SQL-IDENT "FOO">

This case corresponds to an unqualified SQL identifier as in: SELECT FOO FROM BAR .

[foo bar] => #<SQL-IDENT "FOO.BAR">

This corresponds to a qualified SQL identifier as in: SELECT FOO.BAR FROM FOO

["foo" bar] => #<SQL-IDENT "\"foo\".BAR">

This corresponds to a qualified SQL identifier with an aliased table name containing special characters as in: SELECT "foo".BAR FROM BAZ "foo" .

[foo "bar"] => #<SQL-IDENT FOO \"bar\">

This corresponds to an alias definition as in:
SELECT "bar".* FROM FOO "bar".

[foo :integer] => #<SQL-IDENT "FOO" :INTEGER>

As above, but including a type coercion component.

[foo bar :integer] -> #<SQL-IDENT "FOO.BAR" :INTEGER>

As above, but includes a type coercion component.

["foo" bar :integer] -> #<SQL-IDENT "\"foo\".BAR" :INTEGER>

As above, but includes a type coercion component.


LispWorks User Guide - 18 Feb 2003

Next Prev Up Top Contents Index