Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In what context is the MySQL keyword 'one' used?

Tags:

mysql

keyword

I noticed that the word 'one' is on the list of keywords for MySQL. I don't recall seeing any query which uses 'one'. I've searched on here and google, but I haven't found anything about it. Anyone have an example of when this keyword would be used?

like image 279
starshine531 Avatar asked Nov 01 '16 07:11

starshine531


People also ask

What is use keyword in MySQL?

The USE statement tells MySQL to use the named database as the default (current) database for subsequent statements. This statement requires some privilege for the database or some object within it. The database name must be specified on a single line.

What does WHERE 1 mean in MySQL?

In MySQL “Where 1=1” results in all the rows of a table as this statement is always true. An example to better unerstand this statement is given as follows − First, a table is created with the help of the create command.

Is MySQL a keyword type?

Based on that link, "type" and "types" are keywords, but they do not have an (R) beside them, so they are not reserved keywords.

What is new keyword in MySQL?

Within the trigger body, the OLD and NEW keywords enable you to access columns in the rows affected by a trigger. OLD and NEW are MySQL extensions to triggers; they are not case-sensitive. In an INSERT trigger, only NEW. col_name can be used; there is no old row.


1 Answers

I found it a couple places in the 5.7 Manual:

  • XA Transactions for InnoDB 14.3.7.1

    XA COMMIT xid [ONE PHASE]

  • For a SHOW EVENTS FROM table query (14.7.5.18), the results Type field can be ONE TIME

    mysql> SHOW EVENTS\G
    *************************** 1. row ***************************
                      Db: myschema
                    Name: e_daily
                 Definer: jon@ghidora
               Time zone: SYSTEM
                    Type: ONE TIME
              Execute at: NULL
          Interval value: 10
          Interval field: SECOND
                  Starts: 2006-02-09 10:41:23
                    Ends: NULL
                  Status: ENABLED
              Originator: 0
    character_set_client: latin1
    collation_connection: latin1_swedish_ci
      Database Collation: latin1_swedish_ci
    
like image 55
Jason Avatar answered Sep 28 '22 06:09

Jason