[英]SQL alter names - enum datatype..?
Basically I need to change the name of a field, from "aquire_method" to "acquire_method". 基本上,我需要将字段名称从“ aquire_method”更改为“ acquire_method”。 The thing is, it's an enum. 问题是,这是一个枚举。
I read that I could use: 我读到可以使用:
alter table "store_users_items" Change "aquire_method" "acquire_method" DATATYPEHERE;
So I did: 所以我做了:
alter table "store_users_items" Change "aquire_method" "acquire_method" "enum('shop','trade','gift','admin','web')";
But it gives me syntax error. 但这给了我语法错误。 So how would I do this? 那我该怎么做呢?
I think the syntax error could be because of using "
我认为语法错误可能是由于使用了"
Try this: 尝试这个:
alter table store_users_items Change aquire_method acquire_metho enum('shop','trade','gift','admin','web');
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.