DtSQL - SQLite Features

 

 
 

 

 
 

Table

Create Table

SQLite 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_TABLE (
a INTEGER DEFAULT 1 NOT NULL,
b char ( 12 ) DEFAULT 'abc' NOT NULL,
c INTEGER,

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

Rename Table

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

Sample : ALTER TABLE TEST_TABLE RENAME TO TESTTABLE

Truncate Table

SQLite 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 : DELETE FROM TEST_TABLE

Drop Table

SQLite 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_TABLE

TOP
 

Column

Add Column

SQLite 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_TABLE
ADD
D INTEGER DEFAULT 123 NOT NULL

 

TOP
 

View

Create View

SQLite 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_VIEW
AS
SELECT * FROM TEST_TABLE

Drop View

SQLite 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_VIEW

TOP
 

Index

Create Index

SQLite 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_INDEX
ON TEST_TABLE ( A, B DESC, C DESC )

Drop Index

SQLite 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_INDEX

TOP
 

Trigger

Create Trigger

SQLite 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_TRIGGER
AFTER INSERT
ON TEST_TABLE
FOR EACH ROW
BEGIN
UPDATE TEST_TB SET COL1 = COL1 + 1;
END

Drop Trigger

SQLite 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_TRIGGER

TOP

Copyright © DigerTech Inc