-
Notifications
You must be signed in to change notification settings - Fork 664
Create Database
Mathias Rangel Wulff edited this page Jul 29, 2016
·
6 revisions
Syntax:
CREATE [engineid] DATABASE databaseid;
To create AlaSQL 'native' database:
alasql('CREATE DATABASE mybase');
To create external (localStorage on IndexedDB) database:
alasql('CREATE LOCALSTORAGE DATABASE lsbase');
When you create external database, you need to attach database before usage:
alasql('CREATE INDEXEDDB DATABASE ixbase');
alasql('ATTACH INDEXEDDB DATABASE ixbase AS myixdb');
To create new database:
alasql('CREATE DATABASE [My Database]');
// or
var mydb = new alasql.Database();
// or
var mydb = new alasql.Database('My Database');
You can find database:
var mydb = alasql.Database('My Database');
// or
var mydb = alasql.databases['My Database'];
See also: [DROP DATABASE](Drop Database)
© 2014-2024, Andrey Gershun & Mathias Rangel Wulff
Please help improve the documentation by opening a PR on the wiki repo