problem when creating a table in mysql

0

I want to create a table in MySQL to make it work as the postfix validation:

create table virtual ( 
    address varchar(255) not null primary key unique, 
    goto varchar(255) not null 
);

I want to make this simple table but I miss the following error. I know it's grammar but I do not understand anything about MySQL:

  

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'virtual (
  address varchar (255) not null primary key unique,
  goto varchar (255) no 'at line 1

    
asked by Pablito Maugeri 15.05.2017 в 02:39
source

1 answer

3

Good to your query is missing the name of the table, because the word VIRTUAL is a reserved word, try the following:

create table nombre_de_tu_tabla
( 
    address varchar(255) not null primary key unique, 
    goto varchar(255) not null
); 
    
answered by 15.05.2017 / 02:56
source