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.
Prérequis
You must have the MANAGE ANY DBSPACE system privilege.
Execute a CREATE DBSPACE statement.
Exemple
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), ); |
![]() |
Discuter à propos de cette page dans DocCommentXchange.
|
Copyright © 2013, SAP AG ou société affiliée SAP - SAP Sybase SQL Anywhere 16.0 |