[GRASSLIST:7256] db.droptable

Dear GRASSusers,
does it exist the db.droptable command?
It is described in the GRASS GIS Reference Manual and in many tutorials, but
it seems not to exist in my GRASS version (6.1.cvs).
Thanks to everybody.

A. Clerici
Parma University

On Tue, June 21, 2005 18:40, Aldo Clerici said:

Dear GRASSusers,
does it exist the db.droptable command?
It is described in the GRASS GIS Reference Manual and in many tutorials, but
it seems not to exist in my GRASS version (6.1.cvs).

Currently it does not exist. The recommended way of dropping a table is:

echo "DROP TABLE fmacopy" | db.execute

However, it wouldn't be too difficult to create a db.droptable if there is
real demand.

Moritz

I have been learning the GRASS SQL commands and don't fully understand
why there are individual commands for some SQL statements and not
others (for example why not just have db.execute?). In fact, I have
found some SELECT statements don't work in db.execute but do work in
db.select. This seems a bit confusing to me.

David

On 6/21/05, Moritz Lennert <mlennert@club.worldonline.be> wrote:

On Tue, June 21, 2005 18:40, Aldo Clerici said:
> Dear GRASSusers,
> does it exist the db.droptable command?
> It is described in the GRASS GIS Reference Manual and in many tutorials, but
> it seems not to exist in my GRASS version (6.1.cvs).

Currently it does not exist. The recommended way of dropping a table is:

echo "DROP TABLE fmacopy" | db.execute

However, it wouldn't be too difficult to create a db.droptable if there is
real demand.

Moritz

--
David Finlayson
Marine Geology & Geophysics
School of Oceanography
Box 357940
University of Washington
Seattle, WA 98195-7940
USA

Office: Marine Sciences Building, Room 112
Phone: (206) 616-9407
Web: http://students.washington.edu/dfinlays

I think that's because SELECT is for access the date while EXECUTE is for manage the data.
So if you want to delete, update or insert some data db.execute is the right command,
while for extract and query the data db.select is the right one.

Cheers,
Maxi

David Finlayson wrote:

I have been learning the GRASS SQL commands and don't fully understand
why there are individual commands for some SQL statements and not
others (for example why not just have db.execute?). In fact, I have
found some SELECT statements don't work in db.execute but do work in
db.select. This seems a bit confusing to me.

David

On 6/21/05, Moritz Lennert <mlennert@club.worldonline.be> wrote:

On Tue, June 21, 2005 18:40, Aldo Clerici said:
   

Dear GRASSusers,
does it exist the db.droptable command?
It is described in the GRASS GIS Reference Manual and in many tutorials, but
it seems not to exist in my GRASS version (6.1.cvs).
     

Currently it does not exist. The recommended way of dropping a table is:

echo "DROP TABLE fmacopy" | db.execute

However, it wouldn't be too difficult to create a db.droptable if there is
real demand.

Moritz

--

Eng. Massimiliano Cannata
Scuola Universitaria Professionale della Svizzera Italiana
Istituto Scienze della Terra
Via Trevano, c.p. 72
CH-6952 Canobbio-Lugano
Tel: +41 (0)58 666 62 18
Fax +41 (0)58 666 62 09

On Tue, June 21, 2005 20:13, Massimiliano Cannata said:

I think that's because SELECT is for access the date while EXECUTE is
for manage the data.
So if you want to delete, update or insert some data db.execute is the
right command,
while for extract and query the data db.select is the right one.

+ db.execute is for the "power" user, i.e. the one who is willing to learn
some SQL. The other commands are just frontends to db.execute to make life
easier for those that need a little help.

Moritz

Cheers,
Maxi

David Finlayson wrote:

I have been learning the GRASS SQL commands and don't fully understand
why there are individual commands for some SQL statements and not
others (for example why not just have db.execute?). In fact, I have
found some SELECT statements don't work in db.execute but do work in
db.select. This seems a bit confusing to me.

David

On 6/21/05, Moritz Lennert <mlennert@club.worldonline.be> wrote:

On Tue, June 21, 2005 18:40, Aldo Clerici said:

Dear GRASSusers,
does it exist the db.droptable command?
It is described in the GRASS GIS Reference Manual and in many tutorials,
but
it seems not to exist in my GRASS version (6.1.cvs).

Currently it does not exist. The recommended way of dropping a table is:

echo "DROP TABLE fmacopy" | db.execute

However, it wouldn't be too difficult to create a db.droptable if there is
real demand.

Moritz

--

Eng. Massimiliano Cannata
Scuola Universitaria Professionale della Svizzera Italiana
Istituto Scienze della Terra
Via Trevano, c.p. 72
CH-6952 Canobbio-Lugano
Tel: +41 (0)58 666 62 18
Fax +41 (0)58 666 62 09