add date column in sql code example
Example 1: create table with date column in sql
mysql> create table DemoTable
(
StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY,
StudentName varchar(20),
StudentAdmissionDate DATE
);
Query OK, 0 rows affected (0.47 sec)
Example 2: add colum date in sql
ALTER TABLE ADD COLUMN this_date DATE DEFAULT CURRENT_DATE;