Guest User

Untitled

a guest
Sep 17th, 2018
80
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. query = select, ws, from, [ ws, join ], [ ws, where ] ;
  2. select = "SELECT ", column-id, [ { ", ", column-id } ] ;
  3. from = "FROM ", table-name, [ { ws, join } ] ;
  4. join = "JOIN ", table-name, " on ", value-test ;
  5. where = "WHERE ", value-test ;
  6. value-test = value, comparison, value;
  7. column-id = table-name, ".", column-name ;
  8. table-name = ? a valid SQL table name ? ;
  9. column-name = ? a valid SQL column name ? ;
  10. value = column-id | const
  11. comparison = " = " | " > " | " < " | " <= " | " >= " | " <> " ;
  12. const = ? a number ? | ? a SQL single-quoted string ? ;
  13. ws = " " | "\n" | ws, ws ;
RAW Paste Data