DtSQL - Sybase ASE Features

 

 
 

 

 
 

Database

Create Database

Sybase ASE allows to create a new database. After entering the database name, DtSQL can generate and execute the SQL to create the new database.

Sample : CREATE DATABASE"TEST_DB"

Drop Database

Sybase ASE allows to drop an existing database. After entering the database name, DtSQL can generate and execute the SQL to drop the database.

Sample : DROP DATABASE "TEST_DB"

TOP
 

Table

Create Table

Sybase ASE 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 "dbo"."test_table" (
a bigint DEFAULT 1 NOT NULL,
b char ( 12 ) DEFAULT 'abc' NOT NULL,
c decimal ( 12, 2 ) ,

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

Rename Table

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

Sample : sp_rename 'test_table', 'testtable'

Truncate Table

Sybase ASE 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_table"

Drop Table

Sybase ASE 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 "dbo"."test_table"

TOP
 

Column

Add Column

Sybase ASE 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
"dbo"."test_table"
ADD
d varchar(20) DEFAULT 'def' NOT NULL

Change Data Type

Sybase ASE 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 "dbo"."test_table"
MODIFY F BIGINT

Drop Column

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

Sample :
ALTER TABLE "dbo"."test_table"
DROP F

TOP
 

View

Create View

Sybase ASE 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 "dbo"."test_view"
AS
SELECT * FROM "dbo"."test_table"

Rename View

Sybase ASE allows to rename an existing view. After entering the view name, DtSQL can generate and execute the SQL to rename the view.

Sample : sp_rename 'test_view', 'testview'

Drop View

Sybase ASE 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 "dbo"."test_view"

TOP
 

Index

Create Index

Sybase ASE 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 "dbo"."test_index"
ON dbo.test_table ( A, B DESC, C DESC )

Drop Index

Sybase ASE 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

Sybase ASE 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 "dbo"."test_trigger"
ON "TEST_SCHEMA"."TEST_TABLE"
FOR INSERT
AS
UPDATE "dbo"."test_table" SET col1 = col1 + 1

Drop Trigger

Sybase ASE 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
 

Constraint

Create Primary Key

Sybase ASE 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
"dbo"."test_table"
ADD
PRIMARY KEY ( b, c )

Create Foreign Key

Sybase ASE 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
"dbo"."test_table"
ADD
FOREIGN KEY ( a, c )
REFERENCES "dbo"."test_tb" ( col2, col1 )

Create Check Constraint

Sybase ASE 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
"dbo"."test_table"
ADD CONSTRAINT "test_check"
CHECK ( c > 10 )

Create Unique Constraint

Sybase ASE 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
"dbo"."test_table"
ADD CONSTRAINT "test_unique"
UNIQUE ( b, c )

 

TOP
 

Procedure

Create Procedure

Sybase ASE 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 "dob"."test_proc"
( @param1 varhcar(20), @param2 bigint, @parm3 nchar(33) OUTPUT )
AS
BEGIN
SELECT COUNT(*) FROM dbo.syskeys
END

Drop Procedure

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

Sample : DROP PROCEDURE "dbo"."test_proc"

TOP

Copyright © DigerTech Inc