PopSQL
Adding a column in MySQL involves using the ALTER TABLE command.
ALTER TABLE
Here's an example of adding a created_at datetime column to your users table:
created_at
users
ALTER TABLE users ADD created_at DATETIME;
Adding a string (varchar) column with a not null constraint:
ALTER TABLE users ADD bio VARCHAR(100) NOT NULL;
Adding a boolean column with a default value:
ALTER TABLE users ADD active BOOLEAN DEFAULT TRUE;
MySQL offers extensive documentation on supported datatypes in their documentation.
Spread the word