Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating a Struct in MySQL

Tags:

sql

mysql

struct

I want to create a struct like this in MySQL:

CREATE TYPE EMP_DATA(
    SSN Number(9),
    FirstName VARCHAR(20),
    LastName VARCHAR(20),
    Salary NUMBER(9,2)
);

But it keeps telling me that I have an SQL syntax. I cannot find on the web how to create user-defined types in MySQL. How do I go about doing this?

like image 631
harryo Avatar asked Sep 01 '25 20:09

harryo


1 Answers

MySQL does not support User-Defined Datatypes.

The available ones are HERE.

like image 135
aF. Avatar answered Sep 03 '25 12:09

aF.