LAST_DAY(hire_date)+1
SQL>
SQL> CREATE TABLE person (
2 person_code VARCHAR2(3),
3 first_name VARCHAR2(15),
4 last_name VARCHAR2(20),
5 hire_date DATE
6 );
Table created.
SQL>
SQL> INSERT INTO person VALUES ('CA', 'Charlene', 'Atlas', '01-FEB-02');
1 row created.
SQL> INSERT INTO person VALUES ('GA', 'Gary', 'Anderson', '15-FEB-02');
1 row created.
SQL> INSERT INTO person VALUES ('BB', 'Bobby', 'Barkenhagen', '28-FEB-02');
1 row created.
SQL> INSERT INTO person VALUES ('LB', 'Laren', 'Baxter', '01-MAR-02');
1 row created.
SQL>
SQL>
SQL>
SQL> SELECT first_name,
2 last_name,
3 hire_date,
4 LAST_DAY(hire_date)+1 INSURANCE_START_DATE
5 FROM person;
FIRST_NAME LAST_NAME HIRE_DATE INSURANCE
--------------- -------------------- --------- ---------
Charlene Atlas 01-FEB-02 01-MAR-02
Gary Anderson 15-FEB-02 01-MAR-02
Bobby Barkenhagen 28-FEB-02 01-MAR-02
Laren Baxter 01-MAR-02 01-APR-02
SQL>
SQL> drop table PERSON;
Table dropped.
SQL>
SQL>
SQL>
Related examples in the same category