91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

MySQL之SELECT

發布時間:2020-04-08 02:28:27 來源:網絡 閱讀:250 作者:norilover 欄目:MySQL數據庫

下面是連接MySQL后,獲取的SELECT 語句的幫助:

mysql> HELP SELECT
Name: 'SELECT
Description://描述
Syntax://語法
SELECT
    [ALL | DISTINCT | DISTINCTROW ]
      [HIGH_PRIORITY]
      [STRAIGHT_JOIN]
      [SQL_SMALL_RESULT] [SQL_BIG_RESULT] [SQL_BUFFER_RESULT]
      [SQL_CACHE | SQL_NO_CACHE] [SQL_CALC_FOUND_ROWS]
    select_expr [, select_expr ...]
    [FROM table_references
    [WHERE where_condition]
    [GROUP BY {col_name | expr | position}
      [ASC | DESC], ... [WITH ROLLUP]]
    [HAVING where_condition]
    [ORDER BY {col_name | expr | position}
      [ASC | DESC], ...]
    [LIMIT {[offset,] row_count | row_count OFFSET offset}]
    [PROCEDURE procedure_name(argument_list)]
    [INTO OUTFILE 'file_name'
        [CHARACTER SET charset_name]
        export_options
      | INTO DUMPFILE 'file_name'
      | INTO var_name [, var_name]]
    [FOR UPDATE | LOCK IN SHARE MODE]]
SELECT is used to retrieve rows selected from one or more tables, and
can include UNION statements and subqueries. See [HELP UNION], and
http://dev.mysql.com/doc/refman/5.5/en/subqueries.html.
The most commonly used clauses of SELECT statements are these:
o Each select_expr indicates a column that you want to retrieve. There
  must be at least one select_expr.
o table_references indicates the table or tables from which to retrieve
  rows. Its syntax is described in [HELP JOIN].
o The WHERE clause, if given, indicates the condition or conditions
  that rows must satisfy to be selected. where_condition is an
  expression that evaluates to true for each row to be selected. The
  statement selects all rows if there is no WHERE clause.
  In the WHERE expression, you can use any of the functions and
  operators that MySQL supports, except for aggregate (summary)
  functions. See
  http://dev.mysql.com/doc/refman/5.5/en/expressions.html, and
  http://dev.mysql.com/doc/refman/5.5/en/functions.html.
SELECT can also be used to retrieve rows computed without reference to
any table.
URL: http://dev.mysql.com/doc/refman/5.5/en/select.html

接下來我們一起看一下,SELECT 語句的一些參數和用法:
SELECT ->本意: 即為 選擇、挑選;

[ALL | DISTINCT | DISTINCTROW ]

All:所有(默認);
DISTINCT:獨特的,顯示不同的;
DISTINCTROW:顯示不同的行;
mysql> SELECT [DISTINCT/DISTINCTROW] column_name FROM table_name;
ALL參數為默認的參數,而DISTINCT/DISTINCTROW為可選的參數,上面的語句執行后,即可顯示table_name表的column_name 中不同的元素,如果把column_name 改成 * 即為選擇全部,而再加上,這些參數,意思即為選擇不一樣的行,而且在這里DISTINCT/DISTINCTROW沒有區別。

  [HIGH_PRIORITY]
  [STRAIGHT_JOIN]
  [SQL_SMALL_RESULT] [SQL_BIG_RESULT] [SQL_BUFFER_RESULT]
  [SQL_CACHE | SQL_NO_CACHE] [SQL_CALC_FOUND_ROWS]
向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

聊城市| 米林县| 双鸭山市| 景洪市| 微博| 红河县| 京山县| 绥芬河市| 玉屏| 新津县| 柏乡县| 琼结县| 辉南县| 赤壁市| 铜梁县| 白银市| 大埔县| 天柱县| 百色市| 丰都县| 常德市| 南澳县| 星子县| 呼玛县| 山西省| 武威市| 平乐县| 延津县| 天台县| 凉山| 湖北省| 桐庐县| 吴桥县| 太白县| 临颍县| 石楼县| 理塘县| 绥滨县| 象州县| 马公市| 忻州市|