mysql:basic
差異處
這裏顯示兩個版本的差異處。
| 兩邊的前次修訂版前次修改 下次修改 | 前次修改 | ||
| mysql:basic [2009/10/07 13:35] – Forgot Root Password wenpei | mysql:basic [2016/06/01 10:32] (目前版本) – [mysqldump] sars | ||
|---|---|---|---|
| 行 8: | 行 8: | ||
| ===== Techotopia: MySQL Essentials ===== | ===== Techotopia: MySQL Essentials ===== | ||
| http:// | http:// | ||
| + | |||
| + | ====== Check table exist or not ====== | ||
| + | 檢查資料表是否存在 | ||
| + | < | ||
| + | $tbchk = "SHOW TABLES LIKE ' | ||
| + | $tbchkres = mysql_query($tbchk); | ||
| + | </ | ||
| + | |||
| + | $tbchkres 回傳 1 代表存在,回傳 0 代表不存在。 | ||
| + | |||
| + | ====== Create table from other table' | ||
| + | 根據已經存在的資料表結構自動建立新資料表 | ||
| + | CREATE TABLE `new_table` LIKE `old_table`; | ||
| ====== mysqldump ====== | ====== mysqldump ====== | ||
| 行 14: | 行 27: | ||
| mysqldump --user=username --password --default-character-set=latin1 database 〉 dump.sql | mysqldump --user=username --password --default-character-set=latin1 database 〉 dump.sql | ||
| + | ===== Ref ===== | ||
| + | * [[https:// | ||
| ====== BigDump: Staggered MySQL Dump Importer ====== | ====== BigDump: Staggered MySQL Dump Importer ====== | ||
| http:// | http:// | ||
| 行 44: | 行 59: | ||
| Ref: http:// | Ref: http:// | ||
| + | |||
| + | ====== JOIN ====== | ||
| + | {{ : | ||
mysql/basic.1254893737.txt.gz · 上一次變更: 由 wenpei
