To add a column to a database table with mySQL,
1) Open phpmyadmin or mysql prompt.
2) Open desired database.
3) Type: ALTER TABLE contacts ADD email VARCHAR(60) AFTER name;
Note: This will add a column after the column named name.
or
Type: ALTER TABLE contacts ADD email VARCHAR(60) FIRST;
Note:This will add the column email to the beginning of the table. This is not recommended if the table has an auto_incremented id column.
or
Type: ALTER TABLE contacts ADD email VARCHAR(60);
Note: This will add the column email to the end of the table. All new columns will automatically be inserted to the end of the table unless specified otherwise.
© 2018 ALL Rights Reserved | Sitemap
Vancouver | North Vancouver | Burnaby | Richmond | Coquitlam | Port Coquitlam | Surrey | Langley | Maple Ridge | Mission | Abbotsford | Kamloops | Kelowna | Victoria | Squamish | Whistler | Pemberton