SQLMemTable: Embedded BDE Alternative
In-Memory SQL Database for Delphi / C++Builder



Naming conventions
Previous  Top  Next


Introduction

SQL of SQLMemTable supports the most flexible way to name databases, tables and columns.

Table Name
Table name could be a single word or a multiple words. Multiple words name must be enclosed by single or double quotes, or brackets []. For example:

SELECT  *  
FROM  "Detail Parts"

You can also use correlation name:

SELECT  DP.PartNo  
FROM  [Detail Parts] DP


Column Name
SQLMemTable's SQL supports single-word and multiple-words cloumn names. Multiple words name must be enclosed by single or double quotes, or brackets []. Column names that duplicate SQL keywords are also supported.
For example:

SELECT  Orders.[Cust No]
FROM  Orders

You can also use short correlation name for columns:

SELECT  C.Name AS CustName
FROM  Customer C
WHERE CustName LIKE 'Bill%'


Comments
You can use comments in SQL quieries text to keep remarks or some useful information about the query.
Single-line comments should be started with '--' symbols:

-- This is a single-line comment
SELECT  *  FROM  CUSTOMERS

Another variant of comments is enclosing text into /* and */ symbols.
It can be used for temporarily removing of some query parts:

SELECT  *  FROM  CUSTOMERS
/* WHERE (Name = 'Mike') */

ORDER BY CustNo


Reserved Words
Here is the list of words reserved by SQLMemTable's SQL Engine. Some of them are not really supported, but reserved for further implementations.

'ABSOLUTE'
,'ACTION'
,'ADD'
,'ALL'
,'ALLOCATE'
,'ALTER'
,'AND'
,'ANY'
,'ARE'
,'AS'
,'ASC'
,'ASSERTION'
,'AT'
,'AUTHORIZATION'
,'AVG'
,'BEGIN'
,'BETWEEN'
,'BIT'
,'BIT_LENGTH'
,'BLOBBLOCKSIZE'
,'BLOBCOMPRESSIONLEVEL'
,'BOTH'
,'BY'
,'CASCADE'
,'CASCADED'
,'CASE'
,'CAST'
,'CATALOG'
,'CHAR'
,'CHARACTER'
,'CHAR_LENGTH'
,'CHARACTER_LENGTH'
,'CHECK'
,'CLOSE'
,'COALESCE'
,'COLLATE'
,'COLLATION'
,'COLUMN'
,'COMMIT'
,'CONNECT'
,'CONNECTION'
,'CONSTRAINT'
,'CONSTRAINTS'
,'CONTINUE'
,'CONVERT'
,'CORRESPONDING'
,'COUNT'
,'CREATE'
,'CROSS'
,'CURRENT'
,'CURRENT_DATE'
,'CURRENT_TIME'
,'CURRENT_TIMESTAMP'
,'CURRENT_USER'
,'CURSOR'
,'DATE'
,'DAY'
,'DEALLOCATE'
,'DEC'
,'DECIMAL'
,'DECLARE'
,'DEFAULT'
,'DEFERRABLE'
,'DEFERRED'
,'DELETE'
,'DESC'
,'DESCRIBE'
,'DESCRIPTOR'
,'DIAGNOSTICS'
,'DISCONNECT'
,'DISTINCT'
,'DOMAIN'
,'DOUBLE'
,'DROP'
,'ELSE'
,'END'
,'END-EXEC'
,'ESCAPE'
,'EXCEPT'
,'EXCEPTION'
,'EXEC'
,'EXECUTE'
,'EXISTS'
,'EXTERNAL'
,'EXTRACT'
,'FALSE'
,'FETCH'
,'FIRST'
,'FLOAT'
,'FOR'
,'FOREIGN'
,'FOUND'
,'FROM'
,'FULL'
,'GET'
,'GLOBAL'
,'GO'
,'GOTO'
,'GRANT'
,'GROUP'
,'HAVING'
,'HOUR'
,'IDENTITY'
,'IMMEDIATE'
,'IN'
,'INDEX'
,'INDICATOR'
,'INITIALLY'
,'INNER'
,'INPUT'
,'INSENSITIVE'
,'INSERT'
,'INT'
,'INTEGER'
,'INTERSECT'
,'INTERVAL'
,'INTO'
,'IS'
,'ISOLATION'
,'JOIN'
,'KEY'
,'LANGUAGE'
,'LAST'
,'LASTAUTOINCVALUE'
,'LEADING'
,'LEFT'
,'LEVEL'
,'LIKE'
,'LOCAL'
,'LOWER'
,'MATCH'
,'MAX'
,'MIN'
,'MINUS'
,'MINUTE'
,'MODIFY'
,'MODULE'
,'MONTH'
,'NAMES'
,'NATIONAL'
,'NATURAL'
,'NCHAR'
,'NEW'
,'NEXT'
,'NO'
,'NOCASE'
,'NOT'
,'NULL'
,'NULLIF'
,'NUMERIC'
,'OCTET_LENGTH'
,'OF'
,'ON'
,'ONLY'
,'OPEN'
,'OPTION'
,'OR'
,'ORDER'
,'OUTER'
,'OUTPUT'
,'OVERLAPS'
,'PAD'
,'PARTIAL'
,'PASSWORD'
,'POSITION'
,'PRECISION'
,'PREPARE'
,'PRESERVE'
,'PRIMARY'
,'PRIOR'
,'PRIVILEGES'
,'PROCEDURE'
,'PUBLIC'
,'READ'
,'REAL'
,'REFERENCES'
,'RELATIVE'
,'RESTRICT'
,'REVOKE'
,'RIGHT'
,'ROLLBACK'
,'ROWS'
,'SCHEMA'
,'SCROLL'
,'SECOND'
,'SECTION'
,'SELECT'
,'SESSION'
,'SESSION_USER'
,'SET'
,'SIZE'
,'SMALLINT'
,'SOME'
,'SPACE'
,'SQL'
,'SQLCODE'
,'SQLERROR'
,'SQLSTATE'
,'SUBSTRING'
,'SUM'
,'SYSTEM_USER'
,'TABLE'
,'TEMPORARY'
,'THEN'
,'TIME'
,'TIMESTAMP'
,'TIMEZONE_HOUR'
,'TIMEZONE_MINUTE'
,'TO'
,'TRAILING'
,'TRANSACTION'
,'TRANSLATE'
,'TRANSLATION'
,'TRIM'
,'TRUE'
,'UNION'
,'UNIQUE'
,'UNKNOWN'
,'UPDATE'
,'UPPER'
,'USAGE'
,'USER'
,'USING'
,'VALUE'
,'VALUES'
,'VARCHAR'
,'VARYING'
,'VIEW'
,'WHEN'
,'WHENEVER'
,'WHERE'
,'WITH'
,'WORK'
,'WRITE'
,'YEAR'
,'ZONE'


© AidAim Software SQLMemTable: