1

How can I add a new column (like email) in my already created table students using sql command?

In my students table I already have two columns name id and name. It was created using this sql command

CREATE TABLE students(id INT AUTO_INCREMENT, name VARCHAR(255), PRIMARY KEY id);
René Vogt
  • 41,709
  • 14
  • 73
  • 93

1 Answers1

5

You can use ALTER statement to add new column in existing table.

ALTER TABLE students ADD email VARCHAR(100);
Samir
  • 6,832
  • 2
  • 10
  • 30