SQL/MX 3.2.1 Management Manual (H06.26+, J06.15+)
For more information, see the SQL/MX Reference Manual.
Examples for Granting Privileges
This example grants SELECT privilege on a table, but not the privilege of granting SELECT privileges
to others:
GRANT SELECT ON TABLE persnl.employee TO "sql.user1";
This example grants SELECT and DELETE privileges on a table, including the privilege of granting
SELECT and DELETE privileges to others:
GRANT SELECT, DELETE ON TABLE sales.odetail
TO "sql.user1", "sql.user2" WITH GRANT OPTION;
This example grants UPDATE privilege on the named columns to PUBLIC:
GRANT UPDATE (start_date, ship_timestamp)
ON TABLE persnl.project to PUBLIC;
This example grants USAGE privilege on the sequence generator seq1:
GRANT USAGE ON SEQUENCE seq1 TO "sql.user1", "sql.user2";
Revoking Access Privileges
Use the REVOKE statement to revoke the following:
• Access privileges for an SQL/MX table or view, from specified users.
• USAGE privilege for a sequence generator.
For more information, see the SQL/MX Reference Manual.
Access Privileges for SQL/MX Utilities
For more information about the minimum user privileges required to access the SQL/MX utilities,
see the SQL/MX Reference Manual.
Creating SQL/MX Tables
Tables are the foundation of an SQL/MX database. All data physically resides in tables. When
you create a table with the CREATE TABLE statement, you specify the definition of each data column
and the attributes of the physical file in which the table is to be stored. Carefully consider the file
attributes to ensure that the table meets the needs of your application.
The CREATE TABLE statement stores the table definition in the definition schema of the table’s
catalog and creates the table, which physically exists as one or more disk files.
All Guardian files underlying SQL/MX objects use the key-sequenced file organization with format
2. You cannot use entry-sequenced or relative organizations with SQL/MX tables. Before creating
an SQL/MX table, you should understand the key-sequenced type of table organizations and
column, key, and index design considerations. For more information, see “Understanding and
Planning SQL/MX Tables” (page 29).
For more information about loading tables, see the guidelines for loading tables in “Reorganizing
SQL/MX Tables and Maintaining Data” (page 178).
Security Rules for Creating and Altering SQL/MX Tables
Table security ultimately defines much of the security for indexes and views.
80 Creating an SQL/MX Database










