Create a dbspace

To create a dbspace (Sybase Central)
  1. Open the Dbspaces folder for the database.

  2. Choose File » New » Dbspace.

  3. Follow the instructions in the Create Dbspace Wizard.

    The new dbspace appears in the Dbspaces folder.

To create a dbspace (SQL)
Examples

The following command creates a new dbspace called MyLibrary in the file library.db in the same directory as the main file:

CREATE DBSPACE MyLibrary
AS 'library.db';

The following command creates a table LibraryBooks and places it in the MyLibrary dbspace.

CREATE TABLE LibraryBooks (
title CHAR(100),
author CHAR(50),
isbn CHAR(30)
) IN MyLibrary;

The following commands create a new dbspace named MyLibrary, set the default dbspace to the MyLibrary dbspace, and then create the LibraryBooks table in the MyLibrary dbspace.

CREATE DBSPACE MyLibrary
AS 'e:\\dbfiles\\library.db';
SET OPTION default_dbspace = 'MyLibrary';
CREATE TABLE LibraryBooks (
  title CHAR(100),
  author CHAR(50),
  isbn CHAR(30),
);
See also