Jump to content

How do you create a new varible?


fert

Recommended Posts

ALTER TABLE `YOUR_TABLE_NAME` ADD `YOUR_FIELD_NAME` YOUR_FEILD_TYPE NOT NULL ;

a field type is like text (TEXT) or integer (INT).

more field types
http://dev.mysql.com/doc/refman/4.1/en/data-types.html

if you want just a normal string variable like a 'username' and your table is named 'table1' your query might look like:

ALTER TABLE `table1` ADD `username` TEXT NOT NULL 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.