CREATE INDEX Employee_employee_ID_IDX ON Employee4(employee_ID);
RENAME INDEX EMPLOYEE_NAME_IDX TO EMPLOYEE2_NAME_IDX
DROP INDEX OrigIndex
Apache Derby, an Apache DB subproject, is an open source relational database implemented entirely in Java and available under the Apache License, Version 2.0.
前年刚学Air时那会儿摆弄过一阵子的SQLLite, 这个也是基于文件的可嵌入的小型关系数据库 – 体积小 功能可都不小.
随便写写这几天入门Derby的过程.
Java写的通过JDBC操作不同数据库的Swing应用, 功能强大, 支持多数数据库:
Derby并为提供对Show Tables的支持, 但可通过如下方式获取所有Table:
SELECT TABLENAME FROM SYS.SYSTABLES WHERE TABLETYPE='T';
SELECT TABLENAME FROM SYS.SYSTABLES WHERE TABLETYPE='T' AND TABLENAME LIKE 'tableName';
有用的链接: http://old.nabble.com/Howto-get-existing-table-names-td14524593.html
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
DROP TABLE table-Name // DROP TABLE APP.CITIES;
Reference: http://db.apache.org/derby/manuals/reference/sqlj28.html#DROP+TABLE+statement
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,.