Derby : Create/Rename/Drop Index

Categories: Database; Tagged with: ; @ September 16th, 2010 15:39
  1. Create Index 创建, See: CREATE INDEX statement

    CREATE INDEX Employee_employee_ID_IDX ON Employee4(employee_ID);

  2. Rename Index 重命名, See: RENAME INDEX statement

    RENAME INDEX EMPLOYEE_NAME_IDX TO EMPLOYEE2_NAME_IDX

  3. Drop Index 删除 See: DROP INDEX statement

    DROP INDEX OrigIndex

Derby 新手入门

Categories: Database; Tagged with: ; @ September 15th, 2010 22:30

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的过程.

(more…)

使用SQuirreL(Universal) SQL Client管理Derby数据库

Categories: Database; Tagged with: ; @ September 15th, 2010 21:45

Java写的通过JDBC操作不同数据库的Swing应用, 功能强大, 支持多数数据库:

image

(more…)

Derby: Show Tables – Get get existing tables 获取所有表

Categories: Database; Tagged with: ; @ September 15th, 2010 20:59

Derby并为提供对Show Tables的支持, 但可通过如下方式获取所有Table:

Get existing table names 获得已有Table名称列表

SELECT TABLENAME FROM SYS.SYSTABLES WHERE TABLETYPE='T';

Check Table Exists 检查Table是否已存在

SELECT TABLENAME FROM SYS.SYSTABLES WHERE TABLETYPE='T' AND TABLENAME LIKE 'tableName';

有用的链接: http://old.nabble.com/Howto-get-existing-table-names-td14524593.html

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

Newer Posts



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