Development:XMLDB reserved words: Difference between revisions
m (Adding some new reserved words from MDL-18420) |
|||
(19 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
[[ | [[Development:XMLDB Documentation|XMLDB Documentation]] > XMLDB reserved words | ||
---- | ---- | ||
For each RDBMS some words are forbidden to be used as identifiers and they are called '''"reserved words"'''. Here you will find one big list that is automatically generated by the list of reserved words present in the '''XMLDB classes''' (it includes the reserved words for MySQL, PostgreSQL, Oracle and MSSQL). | |||
It's a must to avoid completely the use of these reserved words in your DB structures (tables, columns...). At the end of this page, you'll find [[#Some useful links|some useful links]] about reserved words. | |||
== The list == | == The list == | ||
<code>access, accessible, add, all, alter, analyse, analyze, and, any, array, as, asc, asensitive, asymmetric, audit, authorization, autoincrement, avg, backup, before, begin, between, bigint, binary, blob, both, break, browse, bulk, by, call, cascade, case, cast, change, char, character, check, checkpoint, close, cluster, clustered, coalesce, collate, column, comment, commit, committed, compress, compute, condition, confirm, connect, connection, constraint, contains, containstable, continue, controlrow, convert, count, create, cross, current, current_date, current_role, current_time, current_timestamp, current_user, cursor, database, databases, date, day_hour, day_microsecond, day_minute, day_second, dbcc, deallocate, dec, decimal, declare, default, deferrable, delayed, delete, deny, desc, describe, deterministic, disk, distinct, distinctrow, distributed, div, do, double, drop, dual, dummy, dump, each, else, elseif, enclosed, end, errlvl, errorexit, escape, escaped, except, exclusive, exec, execute, exists, exit, explain, external, false, fetch, file, fillfactor, float, float4, float8, floppy, for, force, foreign, freetext, freetexttable, freeze, from, full, fulltext, function, goto, grant, group, having, high_priority, holdlock, hour_microsecond, hour_minute, hour_second, identified, identity, identity_insert, identitycol, if, ignore, ilike, immediate, in, increment, index, infile, initial, initially, inner, inout, insensitive, insert, int, int1, int2, int3, int4, int8, integer, intersect, interval, into, is, isnull, isolation, iterate, join, key, keys, kill, leading, leave, left, level, like, limit, linear, lineno, lines, load, localtime, localtimestamp, lock, long, longblob, longtext, loop, low_priority, master_heartbeat_period, master_ssl_verify_server_cert, match, max, maxextents, mediumblob, mediumint, mediumtext, middleint, min, minus, minute_microsecond, minute_second, mirrorexit, mlslabel, mod, mode, modifies, modify, national, natural, new, no_write_to_binlog, noaudit, nocheck, nocompress, nonclustered, not, notnull, nowait, null, nullif, number, numeric, of, off, offline, offset, offsets, old, on, once, online, only, open, opendatasource, openquery, openrowset, openxml, optimize, option, optionally, or, order, out, outer, outfile, over, overlaps, overwrite, pctfree, percent, perm, permanent, pipe, pivot, placing, plan, precision, prepare, primary, print, prior, privileges, proc, procedure, processexit, public, purge, raid0, raiserror, range, raw, read, read_only, read_write, reads, readtext, real, reconfigure, references, regexp, release, rename, repeat, repeatable, replace, replication, require, resource, restore, restrict, return, returning, revoke, right, rlike, rollback, row, rowcount, rowguidcol, rowid, rownum, rows, rule, save, schema, schemas, second_microsecond, select, sensitive, separator, serializable, session, session_user, set, setuser, share, show, shutdown, similar, size, smallint, some, soname, spatial, specific, sql, sql_big_result, sql_calc_found_rows, sql_small_result, sqlexception, sqlstate, sqlwarning, ssl, start, starting, statistics, straight_join, successful, sum, symmetric, synonym, sysdate, system_user, table, tape, temp, temporary, terminated, textsize, then, tinyblob, tinyint, tinytext, to, top, trailing, tran, transaction, trigger, true, truncate, tsequal, uid, uncommitted, undo, union, unique, unlock, unsigned, update, updatetext, upgrade, usage, use, user, using, utc_date, utc_time, utc_timestamp, validate, values, varbinary, varchar, varchar2, varcharacter, varying, verbose, view, waitfor, when, whenever, where, while, with, work, write, writetext, x509, xor, year_month, zerofill</code> | |||
== Some useful links == | == Some useful links == | ||
* One Universal Checker: http://www.petefreitag.com/tools/sql_reserved_words_checker/ | |||
* MySQL: http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html | * MySQL: http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html | ||
* PostgreSQL: http://www.postgresql.org/docs/ | * PostgreSQL: http://www.postgresql.org/docs/current/static/sql-keywords-appendix.html | ||
* SQL*Server: http:// | * SQL*Server: http://msdn2.microsoft.com/en-us/library/ms189822.aspx | ||
* Oracle: http:// | * Oracle: http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/ap_keywd.htm | ||
* | * Good site with all the '''real reserved words''' for some DB (with version info): http://search.cpan.org/src/CHANSEN/ (under the SQL-ReservedWords-xx dirs). | ||
* Escaping reserved words: http://www.ispirer.com/doc/sqlways38/Output/SQLWays-1-034.html | |||
* [[XMLDB Problems#Reserved Words in Moodle DB|Current reserved words used by Moodle]]. | |||
[[Category:XMLDB]] |
Latest revision as of 19:21, 2 March 2009
XMLDB Documentation > XMLDB reserved words
For each RDBMS some words are forbidden to be used as identifiers and they are called "reserved words". Here you will find one big list that is automatically generated by the list of reserved words present in the XMLDB classes (it includes the reserved words for MySQL, PostgreSQL, Oracle and MSSQL).
It's a must to avoid completely the use of these reserved words in your DB structures (tables, columns...). At the end of this page, you'll find some useful links about reserved words.
The list
access, accessible, add, all, alter, analyse, analyze, and, any, array, as, asc, asensitive, asymmetric, audit, authorization, autoincrement, avg, backup, before, begin, between, bigint, binary, blob, both, break, browse, bulk, by, call, cascade, case, cast, change, char, character, check, checkpoint, close, cluster, clustered, coalesce, collate, column, comment, commit, committed, compress, compute, condition, confirm, connect, connection, constraint, contains, containstable, continue, controlrow, convert, count, create, cross, current, current_date, current_role, current_time, current_timestamp, current_user, cursor, database, databases, date, day_hour, day_microsecond, day_minute, day_second, dbcc, deallocate, dec, decimal, declare, default, deferrable, delayed, delete, deny, desc, describe, deterministic, disk, distinct, distinctrow, distributed, div, do, double, drop, dual, dummy, dump, each, else, elseif, enclosed, end, errlvl, errorexit, escape, escaped, except, exclusive, exec, execute, exists, exit, explain, external, false, fetch, file, fillfactor, float, float4, float8, floppy, for, force, foreign, freetext, freetexttable, freeze, from, full, fulltext, function, goto, grant, group, having, high_priority, holdlock, hour_microsecond, hour_minute, hour_second, identified, identity, identity_insert, identitycol, if, ignore, ilike, immediate, in, increment, index, infile, initial, initially, inner, inout, insensitive, insert, int, int1, int2, int3, int4, int8, integer, intersect, interval, into, is, isnull, isolation, iterate, join, key, keys, kill, leading, leave, left, level, like, limit, linear, lineno, lines, load, localtime, localtimestamp, lock, long, longblob, longtext, loop, low_priority, master_heartbeat_period, master_ssl_verify_server_cert, match, max, maxextents, mediumblob, mediumint, mediumtext, middleint, min, minus, minute_microsecond, minute_second, mirrorexit, mlslabel, mod, mode, modifies, modify, national, natural, new, no_write_to_binlog, noaudit, nocheck, nocompress, nonclustered, not, notnull, nowait, null, nullif, number, numeric, of, off, offline, offset, offsets, old, on, once, online, only, open, opendatasource, openquery, openrowset, openxml, optimize, option, optionally, or, order, out, outer, outfile, over, overlaps, overwrite, pctfree, percent, perm, permanent, pipe, pivot, placing, plan, precision, prepare, primary, print, prior, privileges, proc, procedure, processexit, public, purge, raid0, raiserror, range, raw, read, read_only, read_write, reads, readtext, real, reconfigure, references, regexp, release, rename, repeat, repeatable, replace, replication, require, resource, restore, restrict, return, returning, revoke, right, rlike, rollback, row, rowcount, rowguidcol, rowid, rownum, rows, rule, save, schema, schemas, second_microsecond, select, sensitive, separator, serializable, session, session_user, set, setuser, share, show, shutdown, similar, size, smallint, some, soname, spatial, specific, sql, sql_big_result, sql_calc_found_rows, sql_small_result, sqlexception, sqlstate, sqlwarning, ssl, start, starting, statistics, straight_join, successful, sum, symmetric, synonym, sysdate, system_user, table, tape, temp, temporary, terminated, textsize, then, tinyblob, tinyint, tinytext, to, top, trailing, tran, transaction, trigger, true, truncate, tsequal, uid, uncommitted, undo, union, unique, unlock, unsigned, update, updatetext, upgrade, usage, use, user, using, utc_date, utc_time, utc_timestamp, validate, values, varbinary, varchar, varchar2, varcharacter, varying, verbose, view, waitfor, when, whenever, where, while, with, work, write, writetext, x509, xor, year_month, zerofill
Some useful links
- One Universal Checker: http://www.petefreitag.com/tools/sql_reserved_words_checker/
- MySQL: http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html
- PostgreSQL: http://www.postgresql.org/docs/current/static/sql-keywords-appendix.html
- SQL*Server: http://msdn2.microsoft.com/en-us/library/ms189822.aspx
- Oracle: http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/ap_keywd.htm
- Good site with all the real reserved words for some DB (with version info): http://search.cpan.org/src/CHANSEN/ (under the SQL-ReservedWords-xx dirs).
- Escaping reserved words: http://www.ispirer.com/doc/sqlways38/Output/SQLWays-1-034.html
- Current reserved words used by Moodle.