I imported a table supermarket from Excel with a column named Sub Category. Now I am querying a SQL CODE to return the column Sub category but I get error 1054, 'sub' unknown column in the field list
SELECT Sub Category FROM supermarket
CodePudding user response:
Since the column name has whitespace inside it,you can use ` to wrap it
SELECT `Sub Category` FROM supermarket