1

I want to create table Books, My syntax:

enter image description here

What is wrong with my code?

2
  • 3
    Please post plain text (using the {} code markup tool), not screen shots. Commented Dec 22, 2014 at 16:56
  • The error would appear to be that you are using angle brackets instead of parentheses. Commented Dec 22, 2014 at 16:57

2 Answers 2

4

You're using angle brackets (<>) where you should be using parentheses (()).

CREATE TABLE books (
    isbn INT PRIMARY KEY,
    title VARCHAR (20),
    price DOUBLE
);
Sign up to request clarification or add additional context in comments.

Comments

0

Try this:

create table books(isbn int primary key, name varchar(20), price double);

2 Comments

An explaination as to how this may fix the problem is required (and anyways, what is the difference with the original query?)
The code is functionally identical to the code in Barmar's answer. .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.