Derby Reference Manual Version 10.12

Derby Reference Manual Version 10.12

Derby Reference Manual Version 10.12 Derby Document build: September 20, 2015, 7:00:40 AM (PDT) Version 10.12 Derby Reference Manual Contents Copyright..............................................................................................................................11 License................................................................................................................................. 12 About this guide..................................................................................................................16 Purpose of this document...................................................................................... 16 Audience................................................................................................................... 16 How this guide is organized...................................................................................16 SQL syntax used in this manual............................................................................17 SQL language reference.....................................................................................................18 Capitalization and special characters....................................................................18 SQL identifiers ........................................................................................................ 18 Rules for SQL identifiers..................................................................................... 19 SQLIdentifier........................................................................................................ 19 aggregateName................................................................................................... 20 authorizationIdentifier...........................................................................................20 columnName........................................................................................................20 constraintName....................................................................................................21 correlationName...................................................................................................21 cursorName......................................................................................................... 21 functionName.......................................................................................................22 indexName...........................................................................................................22 newTableName....................................................................................................22 procedureName................................................................................................... 23 roleName............................................................................................................. 23 schemaName.......................................................................................................23 sequenceName....................................................................................................24 simpleColumnName.............................................................................................24 synonymName..................................................................................................... 24 tableName............................................................................................................24 triggerName......................................................................................................... 25 typeName.............................................................................................................25 viewName............................................................................................................ 25 Statements................................................................................................................ 26 Interaction with the dependency system.............................................................26 ALTER TABLE statement....................................................................................27 CALL (PROCEDURE) statement........................................................................ 31 CREATE statements........................................................................................... 32 DECLARE GLOBAL TEMPORARY TABLE statement....................................... 56 DELETE statement..............................................................................................59 DROP statements................................................................................................59 GRANT statement............................................................................................... 63 INSERT statement...............................................................................................66 LOCK TABLE statement..................................................................................... 68 MERGE statement ............................................................................................. 69 RENAME statements...........................................................................................72 REVOKE statement ............................................................................................73 SELECT statement..............................................................................................77 SET statements................................................................................................... 79 TRUNCATE TABLE statement............................................................................83 UPDATE statement............................................................................................. 83 SQL clauses............................................................................................................. 84 i Version 10.12 Derby Reference Manual CONSTRAINT clause..........................................................................................84 EXTERNAL NAME clause...................................................................................92 FOR UPDATE clause..........................................................................................93 FROM clause.......................................................................................................94 GROUP BY clause..............................................................................................94 HAVING clause................................................................................................... 95 WINDOW clause................................................................................................. 96 ORDER BY clause.............................................................................................. 96 The result offset and fetch first clauses.............................................................. 98 USING clause......................................................................................................99 WHERE clause....................................................................................................99 WHERE CURRENT OF clause.........................................................................100 SQL expressions....................................................................................................101 selectExpression................................................................................................104 tableExpression................................................................................................. 106 NEXT VALUE FOR expression.........................................................................107 VALUES expression.......................................................................................... 108 Expression precedence..................................................................................... 110 Boolean expressions......................................................................................... 110 CASE expression.............................................................................................. 112 Dynamic parameters......................................................................................... 114 JOIN operations..................................................................................................... 117 INNER JOIN operation......................................................................................117 LEFT OUTER JOIN operation...........................................................................118 RIGHT OUTER JOIN operation........................................................................ 119 CROSS JOIN operation.................................................................................... 120 NATURAL JOIN operation................................................................................ 121 SQL queries............................................................................................................122 query.................................................................................................................. 122 scalarSubquery.................................................................................................. 124 tableSubquery....................................................................................................124 Built-in functions....................................................................................................125 Standard

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    455 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us