如何輸入檢索 (queries)

命令提示列 (command-line)

  1. SHOW
    mysql>SHOW DATABASES;
    mysql>SHOW TABLES FROM databaseName; 
    mysql>SHOW COLUMNS FROM databaseName.tableName;
  2. USE
    mysql>USE databaseName

    mysqlUSE 歸於一種命令,可以不加 ; 結尾。

    mysql>SHOW TABLES; 
    mysql>SHOW COLUMNS FROM tableName;
  3. SELECT
    mysql>SELECT 8*8;
    mysql>SELECT VERSION() AS version, CURRENT_DATE AS today, USER() AS user, ROUND(PI(),4) AS pi;
    mysql>SELECT DATABASE();
    mysql>SELECT * FROM tableName;
    mysql>SELECT * FROM databaseName.tableName;

不進入 mysql 管理程式中執行

系統命令提示列
shell>mysql -u root -e "SELECT * FROM databaseName.tableName;"

mysql 提示字元的含意

提示字元說明表
提示字元說明
mysql>準備輸入新的命令
->接續前一行,等候輸入未完整的命令
'>接續前一行,等候輸入關閉的單引號「'
">接續前一行,等候輸入關閉的雙引號「"
`>接續前一行,等候輸入關閉的反引號「`
/*> 接續前一行,等候輸入關閉的註解「*/
參考資源

更新日期:

google 論壇

App javascript (groups.google.com/group/app-javascript/)