Skip to content

geekdecoder

Solving the Mysteries of Geek Code

geekdecoder
  • Services
  • Contact

Add an index to a mysql table

August 22, 2015February 27, 2015 by The Geek Decoder

Create an index to a mysql table. Say there is a product_id column:

CREATE UNIQUE INDEX product_id
on table_name (product_id);

Add to existing table

mysql> alter table tablename add index product_id on product_id;
Categories MySQL
Post navigation
[ERROR] /usr/libexec/mysqld: Sort aborted
Add resolvers to ubuntu server

Search for Articles

Geekdecoder Services

Geekdecoder offers technical services from migrations, server monitoring, server security and hardware rental for dedicated and cloud servers.
See Services.

EZOSHosting Web Hosting

See EZOSHosting Web Hosting Plans and Domain Services.

Featured Articles

  • Zpool Resources
  • Mail fails to deliver due to corrupt /etc/domain_secondary_mx_ips.cdb file
  • Great Article on Adding Proxmox Storage
  • Install Brave Browser on Ubuntu, MintDebian 9+, Ubuntu 14.04+ and Mint 17+
  • How to While List IP’s for Different Email Providers
  • Proxmox Resources
  • Proxmox on Debian Install fails – Errors were encountered while processing: pve-manager proxmox-ve
  • Mount NTFS file system in Debian
  • Where Proxmox ISO Stored
  • Disable TCP Port 135 and Avoid WannaCry Windows 10

Categories

PRIVACY   TERMS OF SERVICE   CONTACT
© 2021 geekdecoder • Built with GeneratePress