Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有这个现有的查询来为现有表创建一个额外的 MySQL 列。:
$wpdb->query("ALTER TABLE mytable ADD COLUMN myarguments VARCHAR(255)");
如何在添加新列的同时创建索引?
将它组合起来添加逗号,例如
ALTER TABLE mytable ADD COLUMN myarguments VARCHAR(255), ADD INDEX (myarguments);