Dose TDengine support black quote in identifier like mysql?
Besides, if there is a ` in a identifier,how can i use?
yes, I tried black quote in table name, it works.
Related
One can use delimited identifier in JDBC query and it works with below databases even for a non reserved keyword with below delimiters:
SQLServer: Square bracket => [select]
Postgres, Teradata, Oracle, Sybase and DB2: double quote => "select"
For Netezza I tried single quote as per documentation, but it did not work.
https://www.ibm.com/support/knowledgecenter/en/SSULQD_7.2.1/com.ibm.nz.dbu.doc/c_dbuser_quoted_mixed_literals.html
Please suggest.
What works at my site is the " (double quotes) around table/column names containing reserved words, spaces, special/national characters, numbers at the beginning and many other things a good data model does not contain (opinion - I know, but a heart felt one)
You need to be aware that anything referenced using "surrounding", becomes cAsE sensitive.
Try querying the catalog view INFORMATION_SCHEMA.COLUMNS using your favorite sql-client (aginity?) and look carefully at the caSiNg etc of the names of the columns/table you try to reference.
Hope this helps - otherwise please post a simple piece of sql that you would expect to succeed, along with the error message you got back, just as ScottMcG suggested
I have oracle express installation, and by default it is case insensitive ( table creation/ keys name ). I want to change it to case sensitive. Is there a configuration to do so?
There is no setting, no.
In any version of Oracle, however, you can use case-sensitive identifiers by enclosing them in double-quotes.
create table "CamelCase" (
"ColumnName1" integer
);
will create a table CamelCase which is case-sensitive and a column ColumnName1 that is case sensitive. In order to use the column, though, every reference will need to be surrounded in double-quotes
SELECT "ColumnName1"
FROM "CamelCase"
would work. However
SELECT ColumnName1
FROM CamelCase
would not.
Using case-sensitive identifiers is generally a really bad idea so I would strongly suggest that you don't do so. It is an option though.
No, there is no configuration for that. You can't make identifiers case-sensitive without quoting them, but Oracle recommends against using quoted identifiers:.
Oracle does not recommend using quoted identifiers for database object names. These quoted identifiers are accepted by SQL*Plus, but they may not be valid when using other tools that manage database objects.
And even then if you have a quoted identifier that is all-caps anyway, e.g. "MY_TABLE", that is treated the same as an unquoted identifier so you can still refer to it as my_table, which might not be case-sensitive enough for you. Anything mixed-case or with invalid characters always has to be referred to quoted though, e.g. `select * from "My Table", which makes code harder to read and maintain (in my opinion anyway).
I'd really recommend not doing this. Anyone having to maintain your schema or code will not thank you for it.
I have created a table that has a column with the name started of type datetime. I was very surprised to see this turn blue when I copied my select statement into management studio. When looking at the list of reserved words for SQL in the Microsoft documentation (see here), I cannot find the word started.
What is it? What does it do?
A very old SSMS problem.
I'm afraid M$ doesn't care about some tokens treated as keywords.
See this.
I don't think so. There is no keyword exist with the name started.
I was able to create table
SQLFiddle Demo
I've created a schema called master in SS2008, however every time I type in the word, it's formatted as blue, rather than black. Should I be worried? I've checked the reserved word list, and it doesn't seem to be on there.
It probably thinks you are refering to the system database which is named master. I would think that is Master is a reserved keyword. Here is a link to what the various color mean.
Red - Character string
Dark Green - Comment
Black, Silver Background - SQLCMD command
Magenta - System function
Green - System table
Blue - Keyword
Teal - Line numbers or template parameter
Maroon - SQL Server stored procedure
Dark Grey - Operators
It is highlighted blue because master is one of the four system databases in sql server - master, model, msdb, and tempdb.
Master is one of the system databases and to reduce confusion should be modified for clarity. Also the SQL parser may first look in the system master database before realizing that your referring to your schema. I know this applies if 'sys' is used when naming objects.
I'm sorry, but this keyword doesn't mean anything to me... Can someone give me a definition?
Thanks in advance...
It's a brand. http://pervasive.com/ And here is a link to their DB products http://www.pervasivedb.com/Pages/PDBProducts.aspx including Pervasive PSQL
Do you mean Pervasive PSQL?
eDeveloper and previous versions of Magic (4GL) use this database as default.