Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
2 | 2 | 0 | 1.000 | statement_sequence[2] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 2 | 693 | E:/TSE/Projects-CloneDR/sql12/fw/src/net/sourceforge/squirrel_sql/fw/dialects/DB2DialectExt.java |
2 | 2 | 725 | E:/TSE/Projects-CloneDR/sql12/fw/src/net/sourceforge/squirrel_sql/fw/dialects/DB2DialectExt.java |
| |||||
/* * DB2 doesn't support adding an auto-increment column once the table has already been created. So this * can simulate one using trigger on the table to access a sequence. Found this idea at wikibooks: * http://en.wikibooks.org/wiki/SQL_dialects_reference/Data_structure_definition/Auto-increment_column * CREATE SEQUENCE sequence_name; CREATE TABLE table_name ( column_name INT ); CREATE TRIGGER * insert_trigger NO CASCADE BEFORE INSERT ON table_name REFERENCING NEW AS n FOR EACH ROW SET * n.column_name = NEXTVAL FOR sequence_name; */ final String tableName = column.getTableName(); final String columnName = column.getColumnName(); |
| |||||
final String tableName = column.getTableName(); final String columnName = column.getColumnName(); |
| |||
/* * DB2 doesn't support adding an auto-increment column once the table has already been created. So this * can simulate one using trigger on the table to access a sequence. Found this idea at wikibooks: * http://en.wikibooks.org/wiki/SQL_dialects_reference/Data_structure_definition/Auto-increment_column * CREATE SEQUENCE sequence_name; CREATE TABLE table_name ( column_name INT ); CREATE TRIGGER * insert_trigger NO CASCADE BEFORE INSERT ON table_name REFERENCING NEW AS n FOR EACH ROW SET * n.column_name = NEXTVAL FOR sequence_name; */ final String tableName = column.getTableName(); final String columnName = column.getColumnName(); |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
None |