Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Randy_Johnson's avatar

MYSQL - Problem with table named 'groups'

I have come across an issue where the database table name, groups is having issues being read in mysql terminal. Am guessing the word group is a key word and that is the issue.

mysql> desc groups;
ERROR 1064 (42000): 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 'groups' at line 1
0 likes
2 replies
Shivamyadav's avatar
Level 20

Using backticks tells MySQL to interpret the enclosed text as a table or column name rather than a reserved keyword.

desc `groups`
1 like
Brammah's avatar

The error is with the syntax, nothing to do with the Group Keyword, the error clearly says:

ERROR 1064 (42000): You have an error in your SQL syntax; .....

The Query can be shared and you can be assisted.

Please or to participate in this conversation.