Deleting Data from a Table
Data can be deleted from a table using the standard SQL DELETE syntax:
DELETE FROM myTable
This DELETE statement will delete all rows in the table. Note that unlike the DROP DATABASE command, deleted data is not archived and backed up. Therefore, when data is deleted in BearDB it is gone forever.
When using the DELETE TABLE command, it is recommended to use a WHERE clause to specify the records to be deleted:
DELETE FROM myTable WHERE columnTwo = 'col2Value'
The WHERE CLAUSE in a SQL statement supports equals
'=', not equals
'<>', greater than
'>', less than
'<', greater than or equal
'>=', less than or equal
NOT LIKE comparators.
BearDB has one limitation when using the SQL WHERE clause:
- The WHERE CLAUSE in a SQL statement does not support the use of parens in this release. As a result, the use of
ORin a WHERE clause will be evaluated from left to right.
BearDB is delivered with some system tables. These system tables do not allow DELETE statements to be executed.