- Query support is limited to standard operations
- As needed I'll improve the system.
change the curent context the database is operating on. The active database.
USE database
read data from a table
- select_expr = { {column | function () } [AS display_name]}
- order_expression = { ASC | DESC }
SELECT [DISTINCT] select_expr [,select_expr ... ]
[FROM table
[WHERE condition
[
[AND condition]
[OR condition]
]
]
[ORDER BY {column_name} order_expression [,{column_name} order_expression ...]]
]
[LIMIT [{offset, }] row_count]
insert a row into the table
INSERT INTO table ({column [,column ...]}) VALUES ({values [,value ...]})
delete a row from the table
DELETE FROM table
[WHERE condition
[
[AND condition]
[OR condition]
]
]
change a row in the table
UPDATE table
SET column=value [, column=value ...]
[WHERE condition
[
[AND condition]
[OR condition]
]
]
display information about a table
DESCRIBE TABLE table
create a new table
CREATE TABLE table
({columns})
FILE=data_file_path
[DELIMITER=field_delimiter(default=',')]
[WHITESPACE=bool]
[ERRORS=bool]
[COMMENTS=bool]
[DATA_ON=data_begins_on_line(default=1)]
remove a table configuration from the database. data files are not affected.
DROP TABLE table
update a table configuration in the database. data files are not affected.
UPDATE TABLE table
({columns})
FILE=data_file_path
[DELIMITER=field_delimiter(default=',')]
[WHITESPACE=bool]
[ERRORS=bool]
[COMMENTS=bool]
[DATA_ON=data_begins_on_line(default=1)]
show all active tables in the database
SHOW TABLES
display the columns in a given table
SHOW COLUMNS FROM table
these functions can be use as a select expression
- database(), returns curent db context
- version(), returns ddb version
- datetime(), returns datetime
- date(), returns date
- time(), returns time
- aggregate function support
- functions: COUNT, JOIN, SUM, DISTINCT, GROUP BY are all high on the list in that order