other versions
- wheezy 6.4.2-2
- jessie 6.4.4-1
- testing 7.2.0-2
- unstable 7.2.0-2
- experimental 7.2.1-1~exp1
| db.select(1grass) | Grass User's Manual | db.select(1grass) |
NAME¶
db.select - Selects data from attribute table (performs SQL query statement(s)).KEYWORDS¶
database, attribute table, SQLSYNOPSIS¶
db.selectFlags:¶
- -c
-
Do not include column names in output
- -d
-
Describe query only (don't run it)
- -v
-
Vertical output (instead of horizontal)
- -t
-
Only test query, do not execute
- --verbose
-
Verbose module output
- --quiet
-
Quiet module output
Parameters:¶
- table=name
-
Table name
- database=name
-
Database nameDefault: $GISDBASE/$LOCATION_NAME/$MAPSET/dbf/
- driver=name
-
Driver nameOptions: pg,dbf,ogr,odbc,mysql,sqliteDefault: dbf
- sql=string
-
SQL select statementFor example: 'select * from rybniky where kapri = 'hodne'
- input=name
-
Name of file with sql statement
- fs=character
-
Output field separatorDefault: |
- vs=character
-
Output vertical record separator
- nv=string
-
Null value indicator
- output=name
-
Name for output file (if omitted or "-" output to stdout)
DESCRIPTION¶
db.select prints result of selection from database based on SQL statement read from input file or from standard input to standard output.NOTE¶
If parameters for database connection are already set with db.connect, they are taken as default values and do not need to be spcified each time. Output will be displayed to stdout or can be directed to a file.EXAMPLES¶
cat file.sql | db.select
db.select input=file.sql
SEE ALSO¶
GRASS SQL interface, db.connect, db.describe, db.drivers, db.droptable, db.execute, db.login, db.tablesAUTHOR¶
?| GRASS 6.4.2 |