How to create a database Table (clothes) with a MySQL request? Here the structure of the table: • id: int (5) with auto increment • name: varchar(25) • description: varchar (50) • size: varchar(5) • color: varchar(15) • gender: varchar(5)
时间: 2024-03-13 19:42:21 浏览: 40
To create a MySQL database table with the structure you specified, you can use the following SQL query:
```
CREATE TABLE clothes (
id INT(5) NOT NULL AUTO_INCREMENT,
name VARCHAR(25) NOT NULL,
description VARCHAR(50),
size VARCHAR(5),
color VARCHAR(15),
gender VARCHAR(5),
PRIMARY KEY (id)
);
```
This will create a table called "clothes" with the specified columns and data types. The "id" column is set to auto increment and is designated as the primary key for the table.
阅读全文