简体   繁体   中英

SQL alter names - enum datatype..?

Basically I need to change the name of a field, from "aquire_method" to "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');

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM