Can different databases use different name quotes?

0 votes

Consider a MySQL quote table name using

SELECT * FROM `table_name`;

notice the single quotes

Now, can any other database ever use different char to quote their table name?

Sep 11, 2018 in Database by darklord
• 6,140 points
24 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

This use of quotes is called delimited identifiers. It's an important part of SQL because otherwise, you can't use identifiers (e.g. table names and column names) that:

  • Include whitespace: "my table"
  • Include special characters and punctuation: "my-table"
  • Include international characters: "私のテーブル"
  • Are case-sensitive: "MyTable"
  • Match SQL keywords: "table"

The standard SQL language uses double-quotes for delimited identifiers:

SELECT * FROM "my table";

MySQL uses back-quotes by default. MySQL can use standard double-quotes:

SELECT * FROM `my table`;
SET GLOBAL SQL_MODE=ANSI_QUOTES;
SELECT * FROM "my table";

Microsoft SQL Server uses brackets by default. Microsoft can use standard double-quotes:

SELECT * FROM [my table];
SET QUOTED_IDENTIFIER ON;
SELECT * FROM "my table";

InterBase and Firebird need to set the SQL dialect to 3 to support delimited identifiers.

Most other brands of database use double-quotes correctly.

answered Sep 11, 2018 by CodingByHeart77
• 3,680 points

Related Questions In Database

0 votes
1 answer

What are the different authentication modes in SQL Server? How can it be changed?

Windows mode and Mixed Mode – SQL ...READ MORE

answered Oct 29, 2018 in Database by darklord
• 6,140 points
29 views
0 votes
1 answer

Why is not preferable to use mysql_* functions in PHP?

The reasons are as follows: The MySQL extension: Does ...READ MORE

answered Sep 7, 2018 in Database by DataKing99
• 8,100 points
25 views
0 votes
1 answer

Different types of SQL Joins

The 4 main kinds of Joins present ...READ MORE

answered Sep 7, 2018 in Database by DataKing99
• 8,100 points
71 views
0 votes
1 answer

Different subsets of SQL

The various subsets of SQL are as ...READ MORE

answered Sep 28, 2018 in Database by darklord
• 6,140 points
577 views
0 votes
1 answer

Different Types Of Index

There are three types of index namely: Unique ...READ MORE

answered Oct 11, 2018 in Database by DataKing99
• 8,100 points
35 views
0 votes
1 answer

How to connect Java program to the MySQL database?

You can connect your Java code with ...READ MORE

answered May 11, 2018 in Java by parth295
• 4,590 points
89 views
0 votes
1 answer

Is SELECT * harmful in Database?

There are really three major reasons: Inefficiency in ...READ MORE

answered Sep 7, 2018 in Database by DataKing99
• 8,100 points
20 views
0 votes
1 answer

Write a SQL query to find the names of employees that begin with ‘S’

To display the name of the employees ...READ MORE

answered Sep 26, 2018 in Database by darklord
• 6,140 points
25 views
0 votes
1 answer

What is the SQL query to get the third highest salary of an employee from employee_table

You can try out something like this: SELECT ...READ MORE

answered Sep 26, 2018 in Database by darklord
• 6,140 points
37 views
0 votes
1 answer

Difference between single and double quotes in SQL

Single quotes are used to indicate the ...READ MORE

answered Sep 11, 2018 in Database by CodingByHeart77
• 3,680 points
46 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.