DtSQL - Solid Features

 

 
 

 

 
 

Schema

Create Schema

Solid allows to create a new schema. After entering the schema name, DtSQL can generate and execute the SQL to create the new schema.

Sample : CREATE SCHEMA "TEST_SCHEMA"

Drop Schema

Solid allows to drop an existing schema. After entering the schema name, DtSQL can generate and execute the SQL to drop the schema.

Sample : DROP SCHEMA "TEST_SCHEMA"

TOP
 

Table

Create Table

Solid allows to create a new table. After entering the table name and column information, DtSQL can generate and execute the SQL to create the table.

  • Column Name
  • Column Type
  • Length/Precesion
  • Scale (decimal)
  • Default Value
  • Nullable
  • Primary Key
  • Unique

Sample :
CREATE TABLE "TEST_SCHEMA"."TEST_TABLE" (
a bigint NOT NULL DEFAULT 1,
b char ( 12 ) NOT NULL DEFAULT 'abc',
c decimal ( 12, 2 ) ,

PRIMARY KEY ( a, b ),
UNIQUE ( b,c )
)

Truncate Table

Solid does not allows to truncate an table and deleting table is used instead. After entering the table name, DtSQL can delete all data in the table.

Sample : TRUNCATE TABLE "TEST_SCHEMA"."TEST_TABLE"

Drop Table

Solid allows to drop an existing table. After entering the table name, DtSQL can generate and execute the SQL to drop the table.

Sample : DROP TABLE "TEST_SCHEMA"."TEST_TABLE"

TOP
 

Column

Add Column

Solid allows to add a new column to an existing table. After selecting the table and entering column information, DtSQL can generate and execute the SQL to add the new column to the table.

  • Column Name
  • Column Type
  • Length/Precesion
  • Scale (decimal)
  • Default Value
  • Nullable

Sample :
ALTER TABLE
"TEST_SCHEMA"."TEST_TABLE"
ADD
d varchar(20) NOT NULL DEFAULT 'def'

Change Data Type

Solid allows to change the column data. After selecting the new data type, DtSQL can generate and execute the SQL to change the column data type.

Sample :
ALTER TABLE "TEST_SCHEMA"."TEST_TABLE"
MODIFY COLUMN F BIGINT

Rename Column

Solid allows to rename an existing column. After selecting the column, DtSQL can generate and execute the SQL to rename the column.

Sample :
ALTER TABLE "TEST_SCHEMA"."TEST_TABLE"
RENAME OLD_COL NEW_COL

Drop Column

Solid allows to delete an existing column. After selecting the column, DtSQL can generate and execute the SQL to delete the column.

Sample :
ALTER TABLE "TEST_SCHEMA"."TEST_TABLE"
DROP COLUMN F

TOP
 

View

Create View

Solid allows to create a new view. After entering the view name and select SQL, DtSQL can generate and execute the SQL to create the view.

Sample :
CREATE VIEW "TEST_SCHEMA"."TEST_VIEW"
AS
SELECT * FROM "TEST_SCHEMA"."TEST_TABLE"

Drop View

Solid allows to drop an existing view. After selecting the view name, DtSQL can generate and execute the SQL to delete the view.

Sample : DROP VIEW "TEST_SCHEMA"."TEST_VIEW"

TOP
 

Index

Create Index

Solid allows to create a new index. After selecting the table columns and entering the view name, DtSQL can generate and execute the SQL to create the index.

Sample :
CREATE UNIQUE INDEX "TEST_SCHEMA"."TEST_INDEX"
ON TEST_SCHEMA.TEST_TABLE ( A, B, C )

Drop Index

Solid allows to drop an existing index. After selecting the index name, DtSQL can generate and execute the SQL to delete the index.

Sample : DROP INDEX "TEST_SCHEMA"."TEST_INDEX"

TOP
 

Trigger

Create Trigger

Solid allows to create a new trigger. After entering the trigger name and trigger actions, DtSQL can generate and execute the SQL to create the trigger.

Sample :
CREATE TRIGGER "TEST_SCHEMA"."TEST_TRIGGER"
ON "TEST_SCHEMA"."TEST_TABLE"
AFTER INSERT
BEGIN
EXEC SQL PREPARE UPDATE_CURS
UPDATE "TEST_SCHEMA"."TEST_TB" SET COL1 = COL1 + 1;
END

Drop Trigger

Solid allows to drop an existing trigger. After selecting the trigger name, DtSQL can generate and execute the SQL to delete the trigger.

Sample : DROP TRIGGER "TEST_SCHEMA"."TEST_TRIGGER"

TOP
 

Constraint

Create Primary Key

Solid allows to create a primary key for a table. After selecting the table columns, DtSQL can generate and execute the SQL to create the primary key.

Sample :
ALTER TABLE
"TEST_SCHEMA"."TEST_TABLE"
ADD
PRIMARY KEY ( B, C )

Create Foreign Key

Solid allows to create a foreign key for a table to reference to another table. After selecting the table columns and referenced table columns, DtSQL can generate and execute the SQL to create the foreign key.

Sample :
ALTER TABLE
"TEST_SCHEMA"."TEST_TABLE"
ADD
FOREIGN KEY ( A, C )
REFERENCES "TEST_SCHEMA"."TEST_TB" (B, A )

Create Check Constraint

Solid allows to create a check constraint for a table column. After entering the check constraint name and check action, DtSQL can generate and execute the SQL to create the check constraint.

Sample :
ALTER TABLE
"TEST_SCHEMA"."TEST_TABLE"
ADD CONSTRAINT "TEST_CHECK"
CHECK ( C > 10 )

Create Unique Constraint

Solid allows to create an unique constraint for a table columns. After entering the unique constraint name and selecting table columns, DtSQL can generate and execute the SQL to create the unique constraint.

Sample :
ALTER TABLE
"TEST_SCHEMA"."TEST_TABLE"
ADD CONSTRAINT "TEST_UNIQUE"
UNIQUE ( B, C )

 

TOP
 

Procedure

Create Procedure

Solid allows to create procedures. After entering the procedure name, parameter names and procedure body, DtSQL can generate and execute the SQL to create the procedure.

Sample :
CREATE PROCEDURE TEST_SCHEMA.TEST_PROC
( IN PARAM1 CHAR(20), INOUT PARAM2 INT, OUT PARAM3 CHAR(12))
BEGIN
EXEC SQL PREPARE SELECT_CURS SELECT * FROM _SYSTEM.SYS_TABLES;
END

Drop Procedure

Solid allows to drop an existing procedure. After selecting the procedure, DtSQL can generate and execute the SQL to delete the procedure.

Sample : DROP PROCEDURE "TEST_SCHEMA"."TEST_PROC"

TOP
 

Sequence

Create Sequence

Solid allows to create sequences. After entering the sequence parameters, DtSQL can generate and execute the SQL to create the sequence.

Sample :
CREATE SEQUENCE "TEST_SCHEMA"."TEST_SEQ"

Drop Sequence

Solid allows to drop an existing sequence. After selecting the sequence, DtSQL can generate and execute the SQL to delete the sequence.

Sample : DROP SEQUENCE "TEST_SCHEMA"."TEST_SEQ"

 

TOP

Copyright DigerTech Inc