Dropping A Database; Working With Tables; Creating Tables - Sybase Adaptive Server IQ 12.4.2 Administration And Performance Manual

Table of Contents

Advertisement

Working with tables

Dropping a database

Working with tables

Creating tables

Creating tables in
Sybase Central
118
Dropping a database deletes all tables and data from disk, including the
transaction log that records alterations to the database. It also drops all of the
dbspaces associated with the database.
To drop a database, use the following statement:
DROP DATABASE dbname
You must specify the database name and its pathname exactly as they were
specified when the database was created.
For example, on a Windows NT system:
DROP DATABASE 'c:\sybase\data\mydb.db'
The database must be stopped before you can drop it. If the connection
parameter
AUTOSTOP=no
statement.
When you create a database, the only tables in it are the system tables, which
hold the database schema.
This section describes how to create, alter, and delete tables from a database.
The examples can be executed in DBISQL, but the SQL statements are
independent of the administration tool you are using.
You may want to create command files containing the
statements that define the tables in your database. The command
ALTER TABLE
files allow you to re-create the database when necessary. They also let you
create tables in a standardized way, which you can copy and revise.
Sybase Central provides a tool called the table editor. In the table editor, you
can create a table definition by filling out a spreadsheet-like form.
To create a table using Sybase Central:
1
Connect to the database.
is used, you may need to issue a
STOP DATABASE
and
CREATE TABLE

Advertisement

Table of Contents
loading

Table of Contents