JED Macro: sql.sl

## sql.sl

creates syntax tables for SQL language. It supports most of the keywords defined in the following SQL variants: Sql92, Sql99, PostgreSql, MySql, MS SQL, Oracle PL/SQL. Each language variant has it's own set of keywords.

The comments are highlighted the same in all SQL variants:

      /*
        Multiline Comment
      */

      -- End Of Line comment

If a mode should support different comments, please report.

### Installation

Put the file somewhere on your jed_library_path and

       autoload ("sql_mode", "sql");
       autoload ("sql92_mode", "sql");
       autoload ("sql99_mode", "sql");
       autoload ("mssql_mode", "sql");
       autoload ("mysql_mode", "sql");
       autoload ("pgsql_mode", "sql");
       autoload ("orsql_mode", "sql");
       add_mode_for_extension ("sql", "sql");

in your .jedrc file.

When you open a file with the `.sql` extension, the function `sql_mode()` will be called which defaults to "sql92". If you wish to use a different default mode you can define the custom variable `sql_default_mode` in the .jedrc file:

       variable sql_default_mode = "mysql";

Now all files with the `.sql` extension (and without a mode defined in the 'modeline') will be treated as MySql files.

If you edit a file that has a syntax different than the default, you can use the modeline (a comment at the beginning of the file) to select the appropriate mode:

      -- -*- mode: pgsql; -*-

The file will be treated as a PostgreSql file.