I have a table. Name of the table is "group"
I run query like this :
SELECT * FROM GROUP
There exist error like this :
Error Code: 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'group
LIMIT 0, 1000' at line 1
Any solution to solve my problem?
Thank you
In a table resulting from CREATE TABLE ... SELECT , columns named only in the CREATE TABLE part come first. Columns named in both parts or only in the SELECT part come after that. The data type of SELECT columns can be overridden by also specifying the column in the CREATE TABLE part.
Syntax: SELECT column1, function_name(column2) FROM table_name WHERE condition GROUP BY column1, column2 ORDER BY column1, column2; function_name: Name of the function used for example, SUM() , AVG(). table_name: Name of the table.
Blanks spaces are restricted in the naming convention of the database object's name and column name of the table.
use backquote :
SELECT * FROM `GROUP`
you can also alias your table name for later use in WHERE
clause for instance:
SELECT * FROM `GROUP` g WHERE g.id = 1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With