SQL Queries

Data Manipulation Language (DML) Queries

Starcounter 3.0 has the same SQL Query Processor as Starcounter 2.3.2. Please refer to the original documentation for the full specification.

Data Definition Language (DDL) Queries

As of right now the following DDL statements are supported:

Create / drop database index

1
CREATE INDEX IX_IndexName ON TableName (ColumnName)
Copied!
1
DROP INDEX IX_IndexName ON TableName
Copied!

Create / drop database table

1
CREATE TABLE TableName
2
(
3
BooleanColumn boolean,
4
DecimalColumn decimal,
5
DoubleColumn double,
6
FloatColumn, float,
7
IntColumn int,
8
UIntColumn uint,
9
TextColumn text
10
)
Copied!
1
DROP TABLE TableName
Copied!

Starcounter database vs .NET CLR data types

There is no one to one match between Starcounter database data types and .NET CLR data types.
Use the following table to translate .NET CLR data type names into Starcounter database SQL data type names.
.NET CLR Data Type
Starcounter database data type
Boolean
boolean
Byte
int
Byte[]
binary
DateTime
uint
Decimal
decimal
Double
double
Float
float
Int16
int
Int32
int
Int64
int
SByte
int
String
text
UInt16
uint
UInt32
uint
UInt64
uint

Create / drop database table column

1
ALTER TABLE TableName
2
DROP COLUMN ColumnName
Copied!
1
ALTER TABLE TableName
2
ADD ColumnName (TextColumn text)
Copied!
Last modified 1yr ago