← Back to team overview

sslug-teknik team mailing list archive

Re: MySQL Alter table

 

Fungera inte, några andra förslag?

mysql> Alter table Prospects DROP E\-post;
ERROR:
Unknown command '\-'.
ERROR 1064: 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 '\-post' at line 1

mysql> Alter table Prospects DROP 'E\-post';
ERROR 1064: 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 ''E\-post'' at line 1

mysql> Alter table Prospects DROP 'E-post';
ERROR 1064: 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 ''E-post'' at line 1



Jesper Krogh wrote:
I sslug.teknik, skrev Niklas Håkansson:

Hej,

Sitter med MySQL och ska ta bort en kolumn som heter E-post.

mysql> Alter table Prospects DROP E-post;

ERROR 1064: 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 '-post' at line 1

Är det - som bråkar och hur gör jag isåfall för att ta bort kolumn E-post.


Prøv Alter table Prospects DROP 'E-post'; eller Alter table Prospects DROP E\-post;








Follow ups

References