zpjx 发表于 2018-10-15 11:30:50

DB2常用SQL的写法(持续更新中...)

-- DB2保留关键字  add                deterministicleave         restart
  after            disallow       left          restrict
  alias            disconnect   like          result
  all                distinct       linktype      result_set_locator
  allocate         do             local         return
  allow            double         locale      returns
  alter            drop         locator       revoke
  and                dsnhattr       locators      right
  any                dssize         lock          rollback
  application      dynamic      lockmax       routine
  as               each         locksize      row
  associate          editproc       long          rows
  asutime            else         loop          rrn
  audit            elseif         maxvalue      run
  authorization      encoding       microsecond   savepoint
  aux                end            microsecondsschema
  auxiliary          end-exec       minute      scratchpad
  before             end-exec1      minutes       second
  begin            erase          minvalue      seconds
  between            escape         mode          secqty
  binary             except         modifies      security
  bufferpool         exception      month         select
  by               excluding      months      sensitive
  cache            execute      new         set
  call               exists         new_table   signal
  called             exit         no            simple
  capture            external       nocache       some
  cardinality      fenced         nocycle       source
  cascaded         fetch          nodename      specific
  case               fieldproc      nodenumber    sql
  cast               file         nomaxvalue    sqlid
  ccsid            final          nominvalue    standard
  char               for            noorder       start
  character          foreign      not         static
  check            free         null          stay
  close            from         nulls         stogroup
  cluster            full         numparts      stores
  collection         function       obid          style
  collid             general      of            subpages
  column             generated      old         substring
  comment            get            old_table   synonym
  commit             global         on            sysfun
  concat             go             open          sysibm
  condition          goto         optimizationsysproc
  connect            grant          optimize      system
  connection         graphic      option      table
  constraint         group          or            tablespace
  contains         handler      order         then
  continue         having         out         to
  count            hold         outer         transaction
  count_big          hour         overriding    trigger
  create             hours          package       trim

  cross             >  current            if             part          undo
  current_date       immediate      partition   union
  current_lc_ctype   in             path          unique
  current_path       including      piecesize   until
  current_server   increment      plan          update
  current_time       index          position      usage
  current_timestampindicator      precision   user
  current_timezone   inherit      prepare       using
  current_user       inner          primary       validproc
  cursor             inout          priqty      values
  cycle            insensitive    privileges    variable
  data               insert         procedure   variant
  database         integrity      program       vcat
  day                into         psid          view
  days               is             queryno       volumes
  db2general         isobid         read          when
  db2genrl         isolation      reads         where
  db2sql             iterate      recovery      while
  dbinfo             jar            references    with
  declare            java         referencing   wlm

  default            join          >  defaults         key            rename      year
  definition         label          repeat      years
  delete             language       reset
  descriptor         lc_ctype       resignal

页: [1]
查看完整版本: DB2常用SQL的写法(持续更新中...)