You can create a dbspace using the CREATE DATABASE statement. A single database file is enough for most databases, but additional dbspaces can be used to create more space for data.
Prerequisites
You must have the MANAGE ANY DBSPACE system privilege.
Execute a CREATE DBSPACE statement.
Example
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), ); |
![]() |
Discuss this page in DocCommentXchange.
|
Copyright © 2014, SAP AG or an SAP affiliate company. - SAP Sybase SQL Anywhere 16.0 |