tech wiz
tech wiz

Reputation: 37

Column name with symbols

I want column names with symbols i.e. {ImportId:week}

I tried placing a " on either side of each symbol and string i.e. "{""ImportId"":""week""}" like this`

CREATE TABLE EXAMPLE
(
"{""ImportId"":""week""}" VARCHAR2(100)
)

but I get the error:

ORA-03001: unimplemented feature

Upvotes: 0

Views: 273

Answers (1)

APC
APC

Reputation: 146339

A pair of double-quotes bounds an identifier. A column can have only one identifier. So just strip out all the unnecessary double-quotes and make the whole piece a single identifier:

CREATE TABLE EXAMPLE
(
"{ImportId:week}" VARCHAR(100)
)

Incidentally, are you really sure you want to do this. Using unapproved symbols in column names is really not necessary and it's not idiomatic. The long term consequence of this naming convention will most likely be a continual low-grade annoyance experienced by everybody who has to work with this table.

Upvotes: 4

Related Questions