CREATE TABLE problems: Invalid column name.

From SQLZOO
Revision as of 10:12, 17 July 2012 by Marek (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

CREATE TABLE problems: Invalid column name.

schema:scott

You may not use a reserved word as the name of a field. Many popular words are used by the system; some words to avoid...
date, day, index, number, order, size, year

SQL Reserved words

Having a "house-rule" can prevent such problems. Some developers

insist that field names begin with fld for example fldSurname. Most of us have enough meaningless junk in their lives already; we

don't need this kind of self imposed tyranny.

DROP TABLE t_wrong
 
CREATE TABLE t_wrong (WHEN DATETIME)
CREATE TABLE t_wrong ([DATE] DATE)
CREATE TABLE t_wrong (DATE DATE)
Personal tools
Namespaces

Variants
Actions
Reference
Toolbox
Google AdSense