Previous Topic Next topic Print topic


To create an empty table and grant access privileges to other users

Restriction: This topic applies only when a Database Connectors license has been installed via the Micro Focus License Management System, and applies to Windows platforms only.
  1. Run your database query tool.

    The program pauses to accept a SQL command.

  2. Enter the following (italics indicate variable names, non-italics are SQL reserved words):
    CREATE TABLE newtab (col1 CHAR(30), col2 CHAR(11)) 
    
    The program pauses to accept a SQL command.
  3. Now enter the following command:
    GRANT ALL PRIVILEGES ON newtab TO PUBLIC

    The program pause to accept a SQL command.

  4. Now enter:
    CREATE UNIQUE INDEX newtab_index ON newtab (col1) 
  5. Next, press Enter again to exit the program.
Note:

When naming columns and tables, make sure to use underscores ("_"), not hyphens ("-"), or a syntax error occurs.

The above entries create a new table and grant access permission to everyone. Enter the following command to delete the table.

DROP TABLE newtab  
Previous Topic Next topic Print topic