I have the employee table:
CREATE TABLE employee
(
id integer PRIMARY KEY,
surname character(15),
employed_date date
);
to which I insert the following row:
INSERT INTO employee
VALUES (4, 'Smith', to_date('2015-11-28','YYYY-MM-DD'));
Can I instead simply write?
INSERT INTO employee
VALUES (4, 'Smith', '2015-11-28');
It works in my PostgreSQL installation. However, I would like to write portable code that works also in other databases, including Oracle, SQL Server, MySQL and SQLite; and with any locales.
Does it work also in these databases? If no, then maybe another format works in these databases and/or is ANSI standard?