If you wish to rename a SQL table use the following code: ALTER TABLE table_name RENAME TO new_table_name;
Add an Index to a MySQL Table
An index speeds up the serving of data by allowing you to quickly find data in a table without having to go row by row […]
Split A Large MySQL Table Into Multiple SQL Files
If you have a large database table that is causing your import to fail, you can split the table out into smaller more manageable chunks […]
Copy MYSQL Table Structure and Import Specific Columns
This code will allow you to copy the table structure from an existing table into a new one and then copy data from specific columns […]
Add A Primary Key To A Table In MYSQL
Run the following code to amend an existing column into a Primary Key ALTER TABLE `wp_posts` ADD PRIMARY KEY (`ID`), MODIFY `ID` bigint(20) UNSIGNED NOT […]
Change Image Filenames In MYSQL (jpg to png)
Create a script (replacing the variables as necessary) and run it to replace ALL instances of (in this case) “star.jpg” to “star.png” <?php // CHANGE […]
Reset All TCP/IP Ports
I recently started running into a problem when using XAMPP webserver to develop site locally. Occasionality the MYSQL service wouldn’t start due to a blocked […]