Enumeration type and collection type of MySQL
CREATE TABLE CREATE TABLE CREATE TABLE CREATE TABLE CREATE TABLE
create table consumer(
id int,
name char(16),
sex enum('male','female','other'),
level enum('vip1','vip2','vip3'),
hobbies set('play','music','read','run')
)
Enumeration here means that you can select only one from here, and set means that you can select more than one from set.
Input insert statement
insert into consumer values(1,'egon','male','vip2','music,read')
And you might be wondering, what happens if I put multiple entries in the corresponding enum?
insert into consumer values(2,'eg','male','vip1,vip2','music,read')
ah
Read More:
- On the usage of ‘ref.stor.type search’ field in SAP WM movement type
- Unity Error:InvalidCastException: Cannot cast from source type to destination type.
- Error tips:array type has incomplete element type
- Es error mapper of different type, current_ Type “text” solution
- Error: property ‘TZ’ does not exist on type ‘type of moment’
- Error type referred to is not an annotation type:RedisCache
- array type has an incomplete element type
- Error: (22,57) Java: type parameter… Mapper is not in the range of type variable M
- Type definition error – one of the causes of type definition errors is WM in Oracle_ Concat function usage
- After introducing sass into Vue project, start to report error typeerror [err]_ INVALID_ ARG_ Type]: the “path” argument must be of type string
- No converter found capable of converting from type [java.lang.String] to type [java.util.Map<java.la
- Type error: cannot unpack non Iterable non type object appears when starting Bert server in Ubuntu system
- [Solved] RuntimeError: Expected object of scalar type Float but got scalar type Double for argument #2 ‘mat1‘
- error: non-const lvalue reference to type cannot bind to a value of unrelated type
- Element ‘dependency‘ cannot have character [children], because the type‘s content type is element-on
- Error attempting to get column ‘xxxxx’ from result set — after Lombok is annotated with builder, mybatis cannot recognize the correct type of field
- ImageIO.read () unsupported image type when reading picture_ exception Unsupported Image Type
- Failed to convert value of type ‘java.lang.String‘ to required type ‘java.util.Date‘;
- RuntimeError: Input type (torch.FloatTensor) and weight type (torch.cuda.FloatTensor) should be the
- MySQL error set: failed to start mysql.service : Unit mysql.service is masked.