Pollard-Rho
阿新 • • 發佈:2020-11-04
簡單使用快速概覽
-
show databases; 檢視所有的庫 use 庫名; 進入這個庫 show tables; 在當前使用的庫中,檢視所有表 show tables from 庫名; 在任意地方,均可以檢視其它庫中的所有表 select database(); 在某個庫中,使用database()函式來查詢當前所在庫的庫名 desc 表名; 檢視這個表的內容資訊
-
新建表,參考示例: create table stuinfo( stuid int, stuname varchar(20), gender char, borndata datetime );
-
在表中插入資料 alter table stuinfo convert to character set utf8; 【將表中的所有字符集更改為utf8】 insert into stuinfo values(1,'張無忌','男','1998-3-3'); 【插入一條資料】 修改表中資料 update stuinfo set borndate='1980-1-1'; 【將這個表中的所有borndate改為1980-1-1】 update stuinfo set borndate='1995-1-1' where stuid=2; 【將這個表中的stuid=2那一行的borndate改為1980-
-
註釋; 單行註釋-1 #abcx -- abcx 多行註釋 /* sdfadfaf */