1

Consider the following CREATE TABLE query :

CRAETE TABLE tablename (100 VARCHAR(10), 200 VARCHAR(10));

In this query, 100 and 200 are column names. Is it possible to create tables like this ?

4

2 に答える 2

2

From the manual

Identifiers may begin with a digit but unless quoted may not consist solely of digits.

于 2013-02-19T02:10:07.197 に答える
1

Yes it is possible but you need to wrap those values with backticks.

CREATE TABLE tablename 
(
`100` VARCHAR(10), 
`200` VARCHAR(10)
);
于 2013-02-19T02:10:09.187 に答える