您好,登錄后才能下訂單哦!
創建數據表:
mysql> use simonwang
Database changed
mysql> show tables;
Empty set (0.00 sec)
mysql> create table t1 (`id` int(4), `name` char(40));
Query OK, 0 rows affected (0.01 sec)
插入數據:
mysql> insert into studytable values(1,'test');
Query OK, 1 row affected (0.00 sec)
mysql> select * from studytable;
+------+------+
| id | name |
+------+------+
| 1 | test |
+------+------+
1 row in set (0.00 sec)
修改數據:
mysql> update studytable set name='updatetest' where id='1';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> select * from studytable;
+------+------------+
| id | name |
+------+------------+
| 1 | updatetest |
+------+------------+
1 row in set (0.00 sec)
清空數據表:
mysql> truncate table studytable;
Query OK, 0 rows affected (0.00 sec)
mysql> select * from studytable;
Empty set (0.00 sec)
刪除數據表:
mysql> drop table studytable;
Query OK, 0 rows affected (0.00 sec)
刪除數據庫:
mysql> drop database simonwang;
Query OK, 0 rows affected (0.01 sec)
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。