Derby: Create, Drop, Rename Table 创建/删除/重命名 Derby表

Categories: Database; Tagged with: ; @ September 15th, 2010 18:02

刚刚接触Derby, Table操作小结:

1. Create Table  创建新表

CREATE TABLE table-Name ( {column-definition | Table-Level Constraint} [ , {column-definition | Table-Level Constraint} ] * )

// CREATE TABLE table1 (a INT, b VARCHAR(10));

Reference: http://db.apache.org/derby/manuals/reference/sqlj27.html#CREATE+TABLE+statement

2. Drop Table 删除表

DROP TABLE table-Name  // DROP TABLE APP.CITIES;

Reference: http://db.apache.org/derby/manuals/reference/sqlj28.html#DROP+TABLE+statement

3. Rename Table 重命名表

RENAME TABLE table-Name TO new-table-Name // RENAME TABLE APP.TEST TO TESTNEW;
Reference: http://db.apache.org/derby/manuals/reference/sqlj29.html#RENAME+TABLE+statement

<->



// Proudly powered by Apache, PHP, MySQL, WordPress, Bootstrap, etc,.