|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
I just made a table using "CREATE TABLE asdf (...);", and I forgot to specify the primary key. Also, how do I ADD/DELETE more columns? Thanks..
Nelson |
|
#2
|
|||
|
|||
|
You need to use the 'ALTER TABLE' statement.
To change a coloumn it's; ALTER TABLE tablename MODIFY columnname column properties ie: ALTER TABLE user MODIFY id INT(11) PRIMARY KEY; To add a column use ADD; ALTER TABLE user ADD password VARCHAR(15) ...etc. Kelvin. |
|
#3
|
|||
|
|||
|
OK, thanks. All the tutorials I found only told you how to CREATE, but not EDIT..
Now I suppose that to delete a column (for future reference) I use "ALTER TABLE tablename DELETE columnname"? |
|
#4
|
|||
|
|||
|
Use;
ALTER TABLE tablename DROP columnname; Kelvin |
![]() |
| Viewing: Dev Shed Forums > Databases > MySQL Help > Delete/Change table info (beginner) |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|