 SQL database system |
Manual page for command(syntax)
Command syntax
These rules apply to shsql commands:
-
Query "words" must generally be separated by whitespace.
Quoted constants are considered one "word" for this purpose.
Comma-delimited lists
are considered one word.
Otherwise, commas may trail words, but may not directly precede words.
Wrong: SELECT A,B,C FROM TABLE WHERE A>10
Correct: SELECT A, B, C FROM TABLE WHERE A > 10
-
Parentheses and carriage returns (newlines) may be used anywhere as
desired for readability, except that newlines may not be embedded in
literal text strings.
-
SQL command keywords, function names, and NULL are case insensitive.
-
Table names and field (column) names are case sensitive, max length 38 characters,
may not contain any white space or punctuation character other than underscore (_),
and must begin with an alphabetic character.
(Temporary table names follow these rules too except that the first character in a
temp table name is always the dollar sign ($)).
-
shsql reserved words should be avoided when choosing table and field names.
The following should definitely not be used (upper or lower case):
FROM WHERE VALUES INTO SET AND OR ON NULL
-
Literal character strings are case sensitive and may be enclosed in double
quotes (") or single quotes('). A literal quote may be represented by
supplying a preceding backslash.
-
Allowable SQL syntax is limited to the constructs illustrated in this manual.
Compound constructs (such as sub-selects) and some other variants are not
supported. For example, joins always use "JOIN .. ON" syntax.
WHERE clauses
have some syntax limitations.
-
No functions() are supported in WHERE clauses, and only
aggregation functions such as count() and avg() are supported in SELECT item lists.
Arithmetic, date and time handling, and string manipulation are not supported in
WHERE clauses or item lists; these must be done by your middleware.
-
The default wild card character for use in WHERE clauses is *.
To use the standard %, set dbwildcard: % in
your project config file.
-
The table.fieldname construct can only be used when a join is being performed.
-
The database.table.fieldname construct is not supported anywhere.
|

Copyright Steve Grubb
|