SQL/MX 3.2 Management Manual (H06.25+, J06.14+)

Table Of Contents
Examples for Granting Privileges
This example grants SELECT privileges 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 privileges on the named columns to PUBLIC:
GRANT UPDATE (start_date, ship_timestamp)
ON TABLE persnl.project to PUBLIC;
Revoking Access Privileges
Use the REVOKE statement to revoke access privileges for an SQL/MX table or view from specified
users. 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 28).
For more information about loading tables, see the guidelines for loading tables in “Reorganizing
SQL/MX Tables and Maintaining Data” (page 176).
Security Rules for Creating and Altering SQL/MX Tables
Table security ultimately defines much of the security for indexes and views.
The rules for creating and altering tables are:
To create an SQL/MX table or other object (including index, view, SPJ, or SQL/MP alias),
you must own its schema or be a super ID user acting on behalf of the owner.
To alter a table, you must own its schema or be a super ID user acting on behalf of the owner.
For more information, see the Access Privileges for SQL/MX Database Objects” (page 78).
Creating SQL/MX Tables 79