Table or column name cannot start with numeric?

Nithandorius

New Member
I tried to create table named \[code\]15909434_user\[/code\] with syntax like below:\[code\]CREATE TABLE 15909434_user ( ... )\[/code\]It would produced error of course. Then, after I tried to have a bit research with google, I found a good article here that describe:\[quote\] When you create an object in PostgreSQL, you give that object a name. Every table has a name, every column has a name, and so on. PostgreSQL uses a single data type to define all object names: the \[code\]name\[/code\] type. A value of type \[code\]name\[/code\] is a string of 63 or fewer characters. A name must start with a letter or an underscore; the rest of the string can contain letters, digits, and underscores. ... If you find that you need to create an object that does not meet these rules, you can enclose the name in double quotes. Wrapping a name in quotes creates a quoted identifier. For example, you could create a table whose name is "\[code\]3.14159\[/code\]"
 
Top