A
A
Artyom2020-02-22 15:01:30
PostgreSQL
Artyom, 2020-02-22 15:01:30

Is it possible to name a table with a number?

It is convenient to use numbers for naming, but I do not know if it will work. Well, there’s no deployed base at hand to try

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
mayton2019, 2020-02-22
@mayton2019

Most likely not, because identifiers always do not start with numbers. This is an old rule. It is already half a century old and it works not only in pg but also in Oracle and in many translator languages.

K
Konstantin Tsvetkov, 2020-02-22
@tsklab

CREATE TABLE "12345"( Value char(10));
It's just a string of numbers. The number gives error 42601.

There is no deployed base at hand
Rextester .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question