0

A very simple query.

CREATE TABLE Group
(
    Group_ID int NOT NULL PRIMARY KEY,
    Group_Name varchar(128)
);

Unfortunately, it will not execute, see error below in PhpMyAdmin. Screenshot

I have checked and checked again, it seems to be syntactically correct, but never will complete.

W.H
  • 187
  • 2
  • 4
  • 15

1 Answers1

0

Group is a reserved keyword to use it as table name you need to escape it.

Use Back-ticks to escape the reserved Keywords

CREATE TABLE `Group`
(
    Group_ID int NOT NULL PRIMARY KEY,
    Group_Name varchar(128)
);
Pரதீப்
  • 91,748
  • 19
  • 131
  • 172