Insert statement and date calculation
mysql>
mysql>
mysql> CREATE TABLE COMMITTEE_MEMBERS
-> (EmployeeNO INTEGER NOT NULL,
-> BEGIN_DATE DATE NOT NULL,
-> END_DATE DATE ,
-> POSITION CHAR(20) ,
-> PRIMARY KEY (EmployeeNO, BEGIN_DATE));
Query OK, 0 rows affected (0.00 sec)
mysql>
mysql>
mysql>
mysql> INSERT INTO COMMITTEE_MEMBERS
-> VALUES (7 + 15, CURRENT_DATE,CURRENT_DATE + INTERVAL 17 DAY, 'Member');
Query OK, 1 row affected (0.00 sec)
mysql>
mysql> drop table COMMITTEE_MEMBERS;
Query OK, 0 rows affected (0.00 sec)
mysql>
Related examples in the same category