cd 更換目錄 dir列出當前目錄所有文件
c:/vesa/.../a> 尖括號表示在c盤/的vasa/的.../的a 文件夾里面
cd空格.. 表示向上一級目錄
cd空格目錄名 表示進入指定目錄
cd空格ted健 表示順序查看目錄名
>mysql 空格 -u用戶名 -p密碼 (即通過用戶名 密碼連數(shù)據(jù)庫)
show databases; 顯示所有數(shù)據(jù)庫
use 數(shù)據(jù)庫名; 表示進入數(shù)據(jù)庫
show tables; 顯示所有數(shù)據(jù)表
select * from 數(shù)據(jù)表名; 查看數(shù)據(jù)表里的數(shù)據(jù)
插入:insert into 字段名(省略不寫的表示所以字段)values 值; (字段名1->值1 字段名2->值2...順序一樣個數(shù)一樣)
更新:update 表名 set 字段名 = 值; (where 字段名=值 and 字段名=值)
查詢:select 字段列表 from 表名;(where 字段名=值 and 字段名=值)
刪除:delete from 表名;(where 字段名=值 and 字段名=值)
創(chuàng)建數(shù)據(jù)庫:create database 數(shù)據(jù)庫名;
刪除列表:drop table 表名 ...;
刪除數(shù)據(jù)庫:drop database 數(shù)據(jù)庫名;
查看表屬性:describe 表名;
修改表屬性:alter table 表名 modify column 字段名 類型;
修改表名:rename table 原表名 to 以后的表名;
增加表列:alter table 表名 add 類型 .. ..;
刪除表列:alter table 表名 drop column 列名;
創(chuàng)建數(shù)據(jù)表:create table 數(shù)據(jù)表名(項名 類型 . .,項名 類型 . .,......);
新聞熱點
疑難解答
圖片精選