Reserved Words in MaxDB

Like MySQL, MaxDB has a number of reserved words that have special meanings. Normally, they cannot be used as names of identifiers, such as database or table names. The following table lists reserved words in MaxDB, indicates the context in which those words are used, and indicates whether or not they have counterparts in MySQL. If such a counterpart exists, the meaning in MySQL might be identical or differing in some aspects. The main purpose is to list in which respects MaxDB differs from MySQL; therefore, this list is not complete.

For the list of reserved words in MySQL, see the section called “Treatment of Reserved Words in MySQL”.

Reserved in MaxDBContext of usage in MaxDBMySQL counterpart
@Can prefix identifier, like “@table”Not allowed
ADDDATE()SQL functionADDDATE(); new in MySQL 4.1.1
ADDTIME()SQL functionADDTIME(); new in MySQL 4.1.1
ALPHASQL functionNothing comparable
ARRAYData typeNot implemented
ASCII()SQL functionASCII(), but implemented with a different meaning
AUTOCOMMITTransactions; ON by defaultTransactions; OFF by default
BOOLEANColumn types; BOOLEAN accepts as values only TRUE, FALSE, and NULLBOOLEAN was added in MySQL 4.1.0; it is a synonym for BOOL which is mapped to TINYINT(1). It accepts integer values in the same range as TINYINT as well as NULL. TRUE and FALSE can be used as aliases for 1 and 0.
CHECKCHECK TABLECHECK TABLE; similar, but not identical usage
COLUMNColumn typesCOLUMN; noise word
CHAR()SQL functionCHAR(); identical syntax; similar, not identical usage
COMMITImplicit commits of transactions happen when data definition statements are issuedImplicit commits of transactions happen when data definition statements are issued, and also with a number of other statements
COSH()SQL functionNothing comparable
COT()SQL functionCOT(); identical syntax and implementation
CREATESQL, data definition languageCREATE
DATABASESQL functionDATABASE(); DATABASE is used in a different context; for example, CREATE DATABASE
DATE()SQL functionCURRENT_DATE
DATEDIFF()SQL functionDATEDIFF(); new in MySQL 4.1.1
DAY()SQL functionNothing comparable
DAYOFWEEK()SQL functionDAYOFWEEK(); by default, 1 represents Monday in MaxDB and Sunday in MySQL
DISTINCTSQL functions AVG, MAX, MIN, SUMDISTINCT; but used in a different context: SELECT DISTINCT
DROPDROP INDEX, for exampleDROP INDEX; similar, but not identical usage
EBCDIC()SQL functionNothing comparable
EXPAND()SQL functionNothing comparable
EXPLAINOptimizationEXPLAIN; similar, but not identical usage
FIXED()SQL functionNothing comparable
FLOAT()SQL functionNothing comparable
HEX()SQL functionHEX(); similar, but not identical usage
INDEX()SQL functionINSTR() or LOCATE(); similar, but not identical syntaxes and meanings
INDEXUSE INDEX, IGNORE INDEX and similar hints are used right after SELECT; for example, SELECT ... USE INDEXUSE INDEX, IGNORE INDEX and similar hints are used in the FROM clause of a SELECT query; for example, in SELECT ... FROM ... USE INDEX
INITCAP()SQL functionNothing comparable
LENGTH()SQL functionLENGTH(); identical syntax, but slightly different implementation
LFILL()SQL functionNothing comparable
LIKEComparisonsLIKE; but the extended LIKE MaxDB provides rather resembles the MySQL REGEX
LIKE wildcardsMaxDB supports “%”, “_”, “Control-underline”, “Control-up arrow”, “*”, and “?” as wildcards in LIKE comparisonsMySQL supports “%”, and “_” as wildcards in LIKE comparisons
LPAD()SQL functionLPAD(); slightly different implementation
LTRIM()SQL functionLTRIM(); slightly different implementation
MAKEDATE()SQL functionMAKEDATE(); new in MySQL 4.1.1
MAKETIME()SQL functionMAKETIME(); new in MySQL 4.1.1
MAPCHAR()SQL functionNothing comparable
MICROSECOND()SQL functionMICROSECOND(); new in MySQL 4.1.1
NOROUND()SQL functionNothing comparable
NULLColumn types; comparisonsNULL; MaxDB supports special NULL values that are returned by arithmetic operations that lead to an overflow or a division by zero; MySQL does not support such special values
PISQL functionPI(); identical syntax and implementation, but parentheses are mandatory in MySQL
REFData typeNothing comparable
RFILL()SQL functionNothing comparable
ROWNOPredicate in WHERE clauseSimilar to LIMIT clause
RPAD()SQL functionRPAD(); slightly different implementation
RTRIM()SQL functionRTRIM(); slightly different implementation
SEQUENCECREATE SEQUENCE, DROP SEQUENCEAUTO_INCREMENT; similar concept, but different implementation
SINH()SQL functionNothing comparable
SOUNDS()SQL functionSOUNDEX(); slightly different syntax
STATISTICSUPDATE STATISTICSANALYZE TABLE; similar concept, but different implementation
SUBSTR()SQL functionSUBSTRING(); slightly different implementation
SUBTIME()SQL functionSUBTIME(); new in MySQL 4.1.1
SYNONYMData definition language: CREATE [PUBLIC] SYNONYM, RENAME SYNONYM, DROP SYNONYMNothing comparable
TANH()SQL functionNothing comparable
TIME()SQL functionCURRENT_TIME
TIMEDIFF()SQL functionTIMEDIFF(); new in MySQL 4.1.1
TIMESTAMP()SQL functionTIMESTAMP(); new in MySQL 4.1.1
TIMESTAMP() as argument to DAYOFMONTH() and DAYOFYEAR()SQL functionNothing comparable
TIMEZONE()SQL functionNothing comparable
TRANSACTION()Returns the ID of the current transactionNothing comparable
TRANSLATE()SQL functionREPLACE(); identical syntax and implementation
TRIM()SQL functionTRIM(); slightly different implementation
TRUNC()SQL functionTRUNCATE(); slightly different syntax and implementation
USESwitches to a new database instance; terminates the connection to the current database instance; all subsequent commands are referred to this database instanceUSE; identical syntax, but does not terminate the connection to the current database
USERSQL functionUSER(); identical syntax, but slightly different implementation, and parentheses are mandatory in MySQL
UTC_DIFF()SQL functionUTC_DATE(); provides a means to calculate the same result as UTC_DIFF()
VALUE()SQL function, alias for COALESCE()COALESCE(); identical syntax and implementation
VARIANCE()SQL functionVARIANCE(); new in MySQL 4.1.0
WEEKOFYEAR()SQL functionWEEKOFYEAR(); new in MySQL 4.1.1