내가 가끔 쓰는 mysql 구절

mysql.hwp mysql> delete from zetyx_board_comment_board where password=’0bc7a0b7062090d5′;
Query OK, 398 rows affected (0.02 sec)

mysql> desc zetyx_board_board;
+—————+——————+——+—–+———+—————-+
| Field         | Type             | Null | Key | Default | Extra          |
+—————+——————+——+—–+———+—————-+
| no            | int(20) unsigned |      | PRI | NULL    | auto_increment |
| division      | int(10)          |      | MUL | 1       |                |
| headnum       | int(20)          |      |     | 0       |                |
| arrangenum    | int(20)          |      |     | 0       |                |
| depth         | int(10) unsigned |      | MUL | 0       |                |
| prev_no       | int(20)          |      | MUL | 0       |                |
| next_no       | int(20)          |      | MUL | 0       |                |
| father        | int(20)          |      | MUL | 0       |                |
| child         | int(20)          |      |     | 0       |                |
| ismember      | int(20)          |      |     | 0       |                |
| islevel       | int(2)           |      |     | 10      |                |
| memo          | text             | YES  |     | NULL    |                |
| ip            | varchar(15)      | YES  |     | NULL    |                |
| password      | varchar(20)      | YES  |     | NULL    |                |
| name          | varchar(20)      |      | MUL |         |                |
| homepage      | varchar(255)     | YES  |     | NULL    |                |
| email         | varchar(255)     | YES  |     | NULL    |                |
| subject       | varchar(250)     |      |     |         |                |
| use_html      | char(1)          | YES  |     | NULL    |                |
| reply_mail    | char(1)          | YES  |     | NULL    |                |
| category      | int(11)          |      | MUL | 1       |                |
| is_secret     | char(1)          |      |     |         |                |
| sitelink1     | varchar(255)     | YES  |     | NULL    |                |
| sitelink2     | varchar(255)     | YES  |     | NULL    |                |
| file_name1    | varchar(255)     | YES  |     | NULL    |                |
| file_name2    | varchar(255)     | YES  |     | NULL    |                |
| s_file_name1  | varchar(255)     | YES  |     | NULL    |                |
| s_file_name2  | varchar(255)     | YES  |     | NULL    |                |
| download1     | int(11)          |      | MUL | 0       |                |
| download2     | int(11)          |      | MUL | 0       |                |
| reg_date      | int(13)          |      | MUL | 0       |                |
| hit           | int(11)          |      | MUL | 0       |                |
| vote          | int(11)          |      | MUL | 0       |                |
| total_comment | int(11)          |      |     | 0       |                |
| x             | varchar(255)     | YES  |     | NULL    |                |
| y             | text             | YES  |     | NULL    |                |
+—————+——————+——+—–+———+—————-+
36 rows in set (0.00 sec)

mysql> update zetyx_board_board set total_comment=4 where no=22;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

댓글 남기기

이메일은 공개되지 않습니다. 필수 입력창은 * 로 표시되어 있습니다.