GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing docs.voltdb.com — DROP TABLE Using VoltDBDROP TABLEDROP TABLE — Removes a table and any data associated with it. SynopsisDROP TABLE table-name [IF EXISTS] [CASCADE] DescriptionThe DROP TABLE statement deletes the specified table, and any data associated with it, from the database. The IF EXISTS clause allows the statement to succeed even if the specified tables does not exist. If the table does not exist and you do not include the IF EXISTS clause, the statement will return an error. Before dropping a table, you must first remove any stored procedures that reference the table. For example, if the table EMPLOYEE is partitioned and the stored procedure AddEmployee is partitioned on the EMPLOYEE table, you must drop the procedure first before dropping the table: PARTITION TABLE Employee ON COLUMN EmpID; CREATE PROCEDURE PARTITION ON TABLE Employee COLUMN EmpID FROM CLASS myapp.procedures.AddEmployee; [. . . ] DROP PROCEDURE AddEmployee; DROP TABLE Employee; Attempting to drop the table before dropping the procedure will result in an error. The same will normally happen if there are any views or indexes that reference the table. However, if you use the CASCADE clause VoltDB will automatically drop any referencing indexes and views as well as the table itself. ExamplesThe following example uses DROP TABLE with the IF EXISTS clause to remove any existing MailAddress table definition and data before adding a new definition. DROP TABLE UserSignin IF EXISTS; CREATE TABLE UserSignin ( userID BIGINT NOT NULL, lastlogin TIMESTAMP DEFAULT NOW ); |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |