CREATE TABLE IF NOT EXISTS vendors (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(255)
);
ALTER TABLE vendors
ADD COLUMN phone VARCHAR(15) AFTER name;
CREATE TABLE IF NOT EXISTS vendors (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(255)
);
ALTER TABLE vendors
ADD COLUMN phone VARCHAR(15) AFTER name;
ALTER TABLE table_name
ADD new_column_name column_definition
[ FIRST | AFTER column_name ],
ADD new_column_name column_definition
[ FIRST | AFTER column_name ],
...
;
select *,(maths + chemistry + physics ) AS total FROM `student`