TYPE_SYM syntax error when running the mysql command to create or replace type Here is my command:

CREATE or REPLACE TYPE DRIVINGSCHED_TYPE AS OBJECT
(
vehicle VARCHAR2(20),
datesched DATE,
starttime DATE,
endtime DATE
);



  ERROR: Line 1: syntax error, unexpected TYPE_SYM, expecting VIEW_SYM.
  Statement skipped.
There is a bit of confusion that needs to be cleared up.
MySQL
In MySQL, the SQL Clause CREATE OR REPLACE works with Views only
You cannot create CREATE OR REPLACE any other types in MySQL (someone correct me if this is not so).
That's why ERROR: Line 1: syntax error, unexpected TYPE_SYM, expecting VIEW_SYM. Statement skipped. says VIEW_SYM is expected.
You also cannot create types with the above syntax in MySQL.
PostgreSQL
You can create types in PostgreSQL, but there is no CREATE OR REPLACE syntax for creating types. You can use CREATE OR REPLACE for creating functions and views, but not types.