Questions tagged [quoted-identifier]

Use this tag for questions involving SQL delimited identifiers (quoted identifiers.)

In SQL, a delimited identifier (also referred to as "quoted identifier") is an identifier (name) enclosed in double quotes.

Delimited identifiers are special in two aspects:

• They can contain characters normally not supported in SQL identifiers. (E.g. "!# odd column name".)

• They can be identical to a reserved word. (E.g. "YEAR".)

Two consecutive double quotation marks within a delimited identifier are interpreted as one double quotation mark. (E.g. "12"" vinyl".)

SQL is by default case insensitive. To make an identifier (name) case sensitive it needs to be quoted. "Some_Table", "SOME_TABLE" and "some_table" are different names because they are quoted. The names some_table, SOME_TABLE and Some_Table are identical names because they are not quoted.

The SQL standard defines the double quote " as the quoting character (single quotes: ' are for string literals.) Some DBMS products deviate from the standard and allow alternative quoting characters. Microsoft SQL Server uses square brackets: [Some_Table] and MySQL uses backticks `Some_Table`.

148 questions
1
vote
2 answers

Updating a PostgreSQL column that contains dot (.) in its name

I should update the value of a row, but the column name has the dot. I tried name.name but nothing, even though it seems to work on MySQL. How can I do with postgresql? I swear that before creating this thread I searched all…
Plaoo
  • 417
  • 3
  • 19
1
vote
1 answer

Turning on Quoted Identifiers for multiple already installed procedures

I have hundreds of procedures that got installed to a database with quoted identifiers set to off and I need them set on. I'm able to view the list of these procedures using the following SELECT name = OBJECT_NAME([object_id]),…
jprice92
  • 387
  • 4
  • 18
1
vote
2 answers

how to access columns if they are named after numbers

My column names in my table are just numbers from 0-20, where each column is corresponding to a number however, when I try select 0 from table I get output of only zeroes in my column, how can I select a column without changing the column…
mei
  • 35
  • 8
1
vote
1 answer

Why can't I delete a row in Postgresql-Pgadmin when I already followed the format?

I have a table Department with 2 columns, DEPT_CODE the PK and DEPT_NAME and both have data types name. I inserted: INSERT INTO public."Department"("DEPT_CODE", "DEPT_NAME") VALUES ('CIS', 'Computer Info Systems'); then I want to delete it so I…
user13302616
1
vote
1 answer

Drop Constraint - Relation does not exists

I'm trying to drop a table constraint using Postbird interface or the following SQL: alter table devices drop constraint FK_473c90a9cf5f18226886e62a3b3 Both way, error is: constraint "fk_473c90a9cf5f18226886e62a3b3" of relation "devices" does not…
jbernardo
  • 161
  • 1
  • 4
  • 14
1
vote
1 answer

Postgres: column does not exist

I have been trying to migrate my databases from MySql to Postgres but I've encountered a big issue that I can't seem to find how to fix. I have a row inserted into the table called "users" and that table has Columns such as UserID, Username, etc. as…
1
vote
0 answers

createdAt in postgres table becomes "do not exist" in SELECT

In the nodejs app, there is a pq 11 database created. I notice that createdAt can not be selected via SQL as do not exist even though the field is listed on pgadmin v4: The Tag table was created with sequelize 6.3 with the code below: const Sql =…
user938363
  • 9,990
  • 38
  • 137
  • 303
1
vote
1 answer

creating a table with column names having brackets

I tried to create a table with postgresql query: CREATE TABLE customer_account(ID_account integer primary key, customer_name (lastname) text); but it gives an error message: ERROR: syntax error at or near "(" LINE 5: customer_name (lastname)…
Dong-gyun Kim
  • 411
  • 5
  • 23
1
vote
1 answer

postgres error: column doesn't exist error in Postgesql 11.6

I am trying to run an update command on postgresql 11.6 by below syntax update "YP_SUPPLIERS" set "YP_SUPPLIERS.supplierName" = "update" where "YP_SUPPLIERS.supplierID" = da68e9d0-1100-43e2-0011-db8fbe654321; I am getting this below error ERROR: …
1
vote
1 answer

On Google Data Studio, using PostgreSQL data, how do I "SELECT * ..." but for camelCase columns?

On Google Data Studio, I cannot create a chart from Postgres data if table columns are in camelCase. I have data in PostgreSQL where I want to get charts from. Integrating it as a data source works fine. Now, I have a problem when creating a…
wtwtwt
  • 368
  • 4
  • 11
1
vote
1 answer

Question on usage of single and double quotes in SQL

I am learning SQL and was wondering about the use of single quotes and double quotes for field names. SELECT * FROM tutorial.billboard_top_100_year_end WHERE year_rank <= 10 AND "group" LIKE '%Ludacris%' Why does the removal of the double…
John Doe
  • 637
  • 2
  • 7
  • 14
1
vote
0 answers

psql: Relation does not exist

I get the following error: test=# Select * from Venue; ERROR: relation "venue" does not exist LINE 1: Select * from Venue; But as you can see here the table exist: I have already spent more than 2 hours, and I cant find my error
user8495738
  • 147
  • 1
  • 3
  • 14
1
vote
3 answers

using spaces in columns names in sql to create table

I am trying to create table by sqlyog i want to use spaces in columns names but i still got errors for example id number i just can do it like this id_number i searched in this website i found two ways [id number] or "id number" i tried it but i…
PRO
  • 21
  • 6
1
vote
1 answer

Postgres: relation does not exist error when table exists on public schema

I have a table that was dumped to Postgres using Pandas and Pandas can read it just fine using the read_sql_table command but I can't seem to be able to access it using SQL. When I run the \dt command, I get the table listed under the public schema…
Kash Pourdeilami
  • 488
  • 2
  • 6
  • 24
1
vote
2 answers

SQL column name with comma

im creating a csv file from sql and i must have column title name with comma like: id,name,company 1,ART,Oracle select ( id || ',' || name || ',' || company ) as **????????** from emplo is there any way to display a sql column title with commas?
Artur Stolc
  • 41
  • 2
  • 9