Microsoft SQL Server, MySQL, Oracle

SQL column name with blank space

Let’s see how we can write queries when a column name contains spaces:

 

Microsoft Sql Server

SELECT [COLUMN Name] FROM TABLE_NAME;

MySQL

SELECT 'Column Name' FROM TABLE_NAME;

Oracle

SELECT "Column Name" FROM TABLE_NAME;