Database Reference
In-Depth Information
DROP INDEX
Use the DROP INDEX command to delete an index, as shown in Figure B-7.
352
Clause
Description
Required?
DROP INDEX index name
Indicates the name of the index to be dropped.
Yes
FIGURE B-7
DROP INDEX command
The following DROP INDEX command deletes the index named RepBal:
DROP INDEX RepBal
;
DROP TABLE
Use the DROP TABLE command to delete a table, as shown in Figure B-8.
Clause
Description
Required?
DROP INDEX table name
Indicates the name of the table to be dropped.
Yes
FIGURE B-8
DROP TABLE command
The following DROP TABLE command deletes the table named SmallCust:
DROP TABLE SmallCust
;
GRANT
Use the GRANT statement to grant privileges to a user. Figure B-9 describes the GRANT statement.
Clause
Description
Required?
GRANT privilege
Indicates the type of privilege(s) to be granted.
Yes
ON database object
Indicates the database object(s) to which the privilege(s) pertain.
Yes
TO user name
Indicates the user(s) to whom the privilege(s) are to be granted.
Yes
FIGURE B-9
GRANT statement
The following GRANT statement grants the user named Johnson the privilege of selecting rows from the
Rep table:
GRANT SELECT ON Rep TO Johnson
;
INSERT
Use the INSERT command and the VALUES clause to insert a row into a table by specifying the values for
each of the columns. As shown in Figure B-10, you must indicate the table into which to insert the values
and then list the values to insert in parentheses.
Clause
Description
Required?
INSERT INTO table name
Indicates the name of the table into which the row will be inserted.
Yes
VALUES (values list)
Indicates the values for each of the columns on the new row.
Yes
FIGURE B-10
INSERT command
Search WWH ::




Custom Search