我试图声明一个枚举并在表创建中使用它。这是我的代码:
SET @myEnum= ENUM('fulfilled', 'noshow', 'cancelled'); CREATE TABLE `Appointments` ( `AppointmentID` VARCHAR(36) NOT NULL UNIQUE, `AppointmentFulfilled` @myEnum );
但是MariaDB给了我一个错误:“@myEnum在这个位置无效,应该是BIGINT…”
有什么想法吗?