H
H
HeartOfProgrammer2015-08-14 12:33:18
SQL
HeartOfProgrammer, 2015-08-14 12:33:18

What syntax error can be in SQL?

I started learning SQL, and immediately there was an error in the syntax. Of course, it would not be worth creating a question on the toaster, but as a beginner, I cannot see this error. Who is not difficult to tell me the error, and on this I will close this issue.

CREATE DATABASE first_db;
USE first_db;
CREATE TABLE users VALUES (
  id INT,
  name VARCHAR (30),
  login VARCHAR (30),
    password VARCHAR (30),
    email VARCHAR (30)
);
INSERT INTO users VALUES (
    1,
    'Alex',
    'Night',
    '123321',
    '[email protected]'
);

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Ukolov, 2015-08-14
@HeartOfProgrammer

You have a problem in the CREATE TABLE syntax, the VALUES keyword is not used there.
dev.mysql.com/doc/refman/5.6/en/create-table.html

P
pesenka1, 2015-08-14
@pesenka1

www.techonthenet.com/sql/tables/create_table.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question