Contents Index Creating databases (Sybase Central) Creating databases (command line)

ASA SQL User's Guide
  Working with Database Objects
    Working with databases
      Creating a database

Creating databases (SQL)

In Interactive SQL, you can use the CREATE DATABASE statement to create databases. You need to connect to an existing database before you can use this statement.

To create a new database (SQL)

  1. Connect to an existing database.

  2. Execute a CREATE DATABASE statement.

For more information, see CREATE DATABASE statement.

Example 

Create a database file in the c:\temp directory with the database name temp.db.

CREATE DATABASE 'c:\\temp\\temp.db'

The directory path is relative to the database server. You set the permissions required to execute this statement on the server command line, using the -gu command-line option. The default setting requires DBA authority.

The backslash is an escape character in SQL, and must be doubled. For more information, see Strings.


Contents Index Creating databases (Sybase Central) Creating databases (command line)