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
  • 165
  • 2
  • 4
  • 13

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ரதீப்
  • 88,697
  • 17
  • 124
  • 160