반응형
mysql> create table topic(
-> id INT(11) NOT NULL AUTO_INCREMENT,
-> title VARCHAR(100) NOT NULL,
-> description TEXT NULL,
-> created DATETIME NOT NULL,
-> author VARCHAR(30) NULL,
-> profile VARCHAR(100) NULL,
-> PRIMARY KEY(id));
mysql> DESC topic;
+-------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------------+--------------+------+-----+---------+----------------+
| id | int | NO | PRI | NULL | auto_increment |
| title | varchar(100) | NO | | NULL | |
| description | text | YES | | NULL | |
| created | datetime | NO | | NULL | |
| author | varchar(30) | YES | | NULL | |
| profile | varchar(100) | YES | | NULL | |
+-------------+--------------+------+-----+---------+----------------+
6 rows in set (0.00 sec)
반응형
'생활코딩 > Dadabase - MySQL' 카테고리의 다른 글
IFNULL - NULL 값 변환 (0) | 2021.10.21 |
---|---|
DATABASE2 MySQL - 13.DELETE (0) | 2021.10.13 |
DATABASE2 MySQL - 11.SELECT - egoing (0) | 2021.10.13 |
DATABASE2 MySQL - 11.SELECT - egoing (0) | 2021.10.13 |
댓글