I have this existing query to create an additional MySQL column to an existing table.:
$wpdb->query("ALTER TABLE mytable ADD COLUMN myarguments VARCHAR(255)");
How can I also create indexes while adding new column?
combine it adding comma, eg
ALTER TABLE mytable ADD COLUMN myarguments VARCHAR(255), ADD INDEX (myarguments);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With