发布网友 发布时间:2022-04-23 10:42
共3个回答
热心网友 时间:2023-10-11 16:42
mysql> create table members(
-> m_no char(6) not null default 'NULL',
-> m_name varchar(50) not null default 'NULL',
-> m_tel char(20) not null default 'NULL',
-> m_password char(8) not null default '000000',
-> m_grade char(2) not null default '1',
-> PRIMARY KEY (m_no)
-> )engine=myisam default charset=utf8;
Query OK, 0 rows affected (0.06 sec)
mysql> desc members;
+------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------+-------------+------+-----+---------+-------+
| m_no | char(6) | NO | PRI | NULL | |
| m_name | varchar(50) | NO | | NULL | |
| m_tel | char(20) | NO | | NULL | |
| m_password | char(8) | NO | | 000000 | |
| m_grade | char(2) | NO | | 1 | |
+------------+-------------+------+-----+---------+-------+
5 rows in set (0.00 sec)
mysql>
热心网友 时间:2023-10-11 16:42
CHAR(2) NOT NULL DEFAULT '1'
);
‘1’后面‘,’去掉。
热心网友 时间:2023-10-11 16:43
未确认弃我而去温柔弃我而去we