Working with tables
118
Dropping a database
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
is used, you may need to issue a
STOP DATABASE
statement.
Working with tables
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
CREATE TABLE
and
ALTER TABLE
statements that define the tables in your database. The command
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.
Creating tables
Creating tables in
Sybase Central
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.
Summary of Contents for Adaptive Server IQ 12.4.2
Page 1: ...Administration and Performance Guide Adaptive Server IQ 12 4 2 ...
Page 16: ...xvi ...
Page 20: ...Related documents xx ...
Page 40: ...Compatibility with earlier versions 20 ...
Page 118: ...Troubleshooting startup shutdown and connections 98 ...
Page 248: ...Importing data by replication 228 ...
Page 306: ...Integrity rules in the system tables 286 ...
Page 334: ...Cursors in transactions 314 ...
Page 396: ...Users and permissions in the system tables 376 ...
Page 438: ...Determining your data backup and recovery strategy 418 ...
Page 484: ...Network performance 464 ...
Page 500: ...System utilities to monitor CPU use 480 ...
Page 514: ...Characteristics of Open Client and jConnect connections 494 ...
Page 536: ...Index 516 ...