logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

db.dropcolumn - Drops a column from selected attribute table.

Author

       Markus Neteler

Description

db.dropcolumn drops a column from an attribute table.  If the -f force flag is not given then nothing  is
       removed, instead a preview of the action to be taken is printed.

Example

       Dropping a column (North Carolina sample dataset):

       # work on own copy
       g.copy vect=roadsmajor,myroads
       db.describe -c myroads
       # only shows what would happen:
       db.dropcolumn myroads column=SHAPE_LEN
       # actually drops the column
       db.dropcolumn -f myroads column=SHAPE_LEN
       db.describe -c myroads

Keywords

       database, attribute table

Name

db.dropcolumn  - Drops a column from selected attribute table.

Notes

db.dropcolumn is a front-end to db.execute to allow easier usage with a special workaround for the SQLite
       driver to support column drop also for SQLite tables.

See Also

db.describe,db.droptable,db.execute,v.db.dropcolumn,GRASSSQLinterface

Source Code

       Available at: db.dropcolumn source code (history)

       Accessed: Friday Apr 04 01:21:10 2025

       Main index | Database index | Topics index | Keywords index | Graphical index | Full index

       © 2003-2025 GRASS Development Team, GRASS GIS 8.4.1 Reference Manual

GRASS 8.4.1                                                                                db.dropcolumn(1grass)

Synopsis

db.dropcolumndb.dropcolumn--helpdb.dropcolumn  [-f]  table=namecolumn=name   [database=name]    [driver=name]    [--help]   [--verbose]
       [--quiet]  [--ui]

   Flags:-f
           Force removal (required for actual deletion of files)

       --help
           Print usage summary

       --verbose
           Verbose module output

       --quiet
           Quiet module output

       --ui
           Force launching GUI dialog

   Parameters:table=name[required]
           Name of attribute table

       column=name[required]
           Name of attribute column

       database=name
           Name of database

       driver=name
           Name of database driver
           Options: dbf,odbc,ogr,sqlite,pg

See Also