-1

Can someone please tell what is wrong with below SQL code?

CREATE TABLE student (
    student_id INT PRIMARY KEY,
    first_name VARCHAR(20),
    major VARCHAR(20),
    );
1
  • 3
    Please add the error message to your question.
    – Dan Guzman
    Jun 29 at 10:38

1 Answer 1

2

You need to remove the comma after the last column declaration.

CREATE TABLE student
(
    student_id  INT PRIMARY KEY,
    first_name  VARCHAR(20),
    major       VARCHAR(20)
);

Not the answer you're looking for? Browse other questions tagged or ask your own question.