Answers for "mysql add date column"

SQL
1

how to add timestamp column in mysql

ALTER TABLE `table1` ADD `lastUpdated` TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ;
Posted by: Guest on September-24-2020
0

how to assign date field for table in mysql

CREATE TABLE people (
    id INT AUTO_INCREMENT PRIMARY KEY,
    first_name VARCHAR(50) NOT NULL,
    last_name VARCHAR(50) NOT NULL,
    birth_date DATE NOT NULL
);
Posted by: Guest on June-18-2020

Code answers related to "SQL"

Browse Popular Code Answers by Language