發表文章

目前顯示的是有「Mysql」標籤的文章

MySQL 指令

MySQL指令大全 : 基本指令 : 資料定義語言 ( DDL is Data Definition Language statements) :使用者角度 建立資料庫或資料表 :   create 更變資料庫或資料結構 :   alter 刪除資料庫或資料表 :   drop 資料操作語言 ( DML  is Data Manipulation Language statements) : 建設者角度, 查詢資料 : SELECT column_name(s) FROM table_name select 查詢   (1) 條件查詢where     a. 條件表達式的意義,表達式為真,則該行取出 b. 比較運算符= ,!=,< > <= >=     c. like , not like ('%'匹配任意多個字符,'_'匹配任意單個字符)in , not in , between and     d. is null , is not null   (2) 分組group by, 一般要配合5個聚合函數使用:max,min,sum,avg,count   (3) 篩選having   (4) 排序order by   (5) 限制limit 插入指定資料 : INSERT INTO table_name (column1,column2)VALUES (value1,value2); 插入多筆資料 : INSERT INTO table_name (column1,column2)VALUES (value1,value2),(value1,value2),(value1,value2)....; 插入所有資料 : INSERT INTO table_name VALUES (value1,value2); 更新資料 :  UPDATE table_name SET column1=value, ... WHERE some_column=some_value 刪除資料 :  DELETE F...

MySQL如何設定一組備份帳號

例如新增一組 test 帳號,密碼為123456 grant select,reload,lock tables on *.* to 'test'@'192.168.1.200' identified by "123456";