免费视频淫片aa毛片_日韩高清在线亚洲专区vr_日韩大片免费观看视频播放_亚洲欧美国产精品完整版

打開APP
userphoto
未登錄

開通VIP,暢享免費(fèi)電子書等14項(xiàng)超值服

開通VIP
mysql 安裝目錄及相關(guān)操作
登錄:[mysql@localhost~]$ sudo bin/mysql --port=3306 -u root -p -S /tmp/mysql.sock

install Doct include:                               windows
---------------------------------------
目錄              目錄內(nèi)容
-----------------------------------------
bin             客戶端程序和mysql服務(wù)器
data            日志文件 數(shù)據(jù)庫
docs            文檔
examples        示例程序和腳本
nclude          包含頭文件
lib             庫
scripts         實(shí)用工具腳本
share           錯誤消息文件
==========================
安裝后將會在以下系統(tǒng)目錄產(chǎn)生文件                           linux
---------------------------------------
/usr/bin                  客戶端程序和腳本
/usr/sbin                 mysql服務(wù)器
/var/lib/mysql            日志文件 數(shù)據(jù)庫
/usr/share/doc/packages   文檔
/usr/incude/mysql         包含頭文件
/usr/lib/mysql            庫
/usr/share/mysql          錯誤消息和字符文件
/usr/share/sql-bench      基準(zhǔn)程序
--------------------------------
=======================操作==============================
 
 
   1. 創(chuàng)建/刪除數(shù)據(jù)庫:create/drop database xxx;
   2. 創(chuàng)建/刪除表:   create/drop table  xxx [valuse ()];
   3. 添加索引等:    create index on xxx (yyy);
   4. 復(fù)制表:        create table yyy select [*,y,z ]from xxx [where gggg];  此時(shí)表的結(jié)構(gòu)類似  建立空表  在 where 中設(shè)置一個(gè)不存在的關(guān)系
                   create table like xxx;
   5. 修改表:  
       添加新字段  alter table xxx add xyz hfbi ;
       修改已存在的字段的名字和類型: alter table change  xxx yyy fdhjj;
       刪除字段: alter table xxx drop yhn;
       重命名: alter table xxx rename to yyy;   rename table xxx to yyy;
   6. 使用數(shù)據(jù):
       插入記錄:insert into xxx values ();
       更新記錄:update xxx set hgk=gjhau [where nuhgkji];
       刪除記錄:delect from xxx where jkhaurh;     當(dāng)省略 where 時(shí)刪除所有記錄
       內(nèi)建函數(shù):select  sum() avg() now() from xxx [where jhak];   好像不能和字段在一塊查詢?
       別名 as 限制 limit 排序 orer by [asc  desc] 分組 group by
       使用變量: select @dfkb:=某操作結(jié)果   使用: select @dfkb; select fhu from xxx where bflb=@dfkb;
       復(fù)制記錄:insert into xxx [()] select jg,gh from yyy [where jha];
       批量數(shù)據(jù):load data local infile '/home/lvshang/....' into table xxx fields terminated by ',' lines terminated by '\n\;
       導(dǎo)出記錄:select gi,jghe from xxx [where fhfnk ] into outfile '/home/lvshang/yyyy' fields terminsted by ',' enclosed by
               '"' lines terminated by '\t\n';
 
  1.修改表的相關(guān)內(nèi)容的知識
   1.1
      alter table biao1 add clomname xxx;  追加新的字段
   1.2
      alter table biao1 drop clomname;     刪除原有的字段
   1.3
      alter table biao1 change clomname clomname_new xxx ;  改編字段的相關(guān)內(nèi)容
   1.4
      alter tbale biao1 modify clomname xxxx;  只是修改字段的類型等內(nèi)容,不改變字段的名字
   1.5
      alter table biao1 rename to name_new; rename table  biao1 to name_new;    均為重命名表明
   1.6
      alter table biao1 alter clomname set default xx/drop default   為一個(gè)字段設(shè)置或刪除默認(rèn)值xx (數(shù)字),不常用
   1.7
      alter ignore table biao1 change clomname xxx unique;  將表的clomname 字段設(shè)置為不允許重復(fù)的出現(xiàn)。注意前面的 IGNORE
   1.8
      alter table biao1 type= xxx;  將表的類型改為 xxx .
   1.9
      alter table biao1 add fulltext index xxx; alter table biao1 drop index xxx;  增加/刪除索引
 
 2. 批量添加本地文件:
   load data local infile '/usr/lvshang/biaox' into table biaoy fields terminated by ',' lines terminated by '\n';
  
本站僅提供存儲服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點(diǎn)擊舉報(bào)。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
作業(yè)題
Mysql Tips
mysql 給表和字段加注釋
sql與mysql往表里插入字段的區(qū)別
mysql 增加字段 修改字段 刪除表字段
mysql中SQL語句修改2
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長圖 關(guān)注 下載文章
綁定賬號成功
后續(xù)可登錄賬號暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服