other versions
- jessie 6.4.4-1
- stretch 7.2.0-2
- testing 7.6.0-1
- unstable 7.6.0-1
- experimental 7.6.1-1~exp1
grass-dbf(1grass) | Grass User's Manual | grass-dbf(1grass) |
NAME¶
grass-dbf - DBF driver DBF driver DBF driver in GRASSDefining the DBF driver¶
The DBF driver is the default driver, in theory no user interaction is required. However, if the settings should be set back from a different to the DBF driver, the following step is required:Creating a DBF table¶
Usually DBF tables are created by GRASS when generating a vector map with attributes (and using DBF as default attribute driver). If a DBF table has to be created manually, db.execute can be used or a spreadsheet application. Also db.copy is sometimes useful as well as db.in.ogr to import external tables.Supported SQL commands by DBF driver¶
ALTER TABLE table ADD [COLUMN] columndef
ALTER TABLE table DROP COLUMN colname
CREATE TABLE table ( columndefs )
DROP TABLE table
SELECT columns FROM table
SELECT columns FROM table WHERE condition
SELECT columns FROM table ORDER BY column
DELETE FROM table
DELETE FROM table WHERE condition
INSERT INTO table VALUES (value1[,value2,...])
INSERT INTO table ( column1[,column2,...] ) VALUES (value1[,value2,...])
UPDATE table SET assignment1[,assignment2,...]
UPDATE table SET assignment1[,assignment2,...] WHERE condition
Operators available in conditions¶
"=" : equal
"<" : smaller than
"<=" : smaller/equal than
">" : larger than
">=" : larger/equal than
"<>" : not equal
"~" : Substring matching (non-standard SQL)
"%" : Substring matching (limited functionality)
LIMITATIONS OF THE DBF DRIVER¶
The DBF driver supports only a few SQL statements since the DBF tables are intended for simple table storage. DBF column names are limited to 10 characters (as defined in the DBF specifications). For example,-
aggregate functions (sum, count, min, max,...) are not supported in SELECT clauses;
-
mathematic functions (sin, cos, exp, log,...) are not supported in expressions;
-
SQL query with IN are not supported.
ERROR MESSAGES¶
An error message such as:SEE ALSO¶
db.connect, SQL support in GRASS GISGRASS 6.4.4 |