CREATE TYPE on MySQL

后端 未结 2 1463
青春惊慌失措
青春惊慌失措 2020-11-30 11:43

I couln\'t create a new data type on MySQL. Query is given below

CREATE TYPE PERSON AS OBJECT
(NAME       VARCHAR (30),
 SSN        VARCHAR (9));


        
相关标签:
2条回答
  • 2020-11-30 11:56

    You cannot. MySQL doesn't have user-defined types. (At least, not in current versions.)

    0 讨论(0)
  • 2020-11-30 12:05

    You can use JSON data type now. MySQL supports the native JSON data type since version 5.7. 8.

    0 讨论(0)
提交回复
热议问题