<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://grasswiki.osgeo.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=%E2%9A%A0%EF%B8%8FRobbiebow</id>
	<title>GRASS-Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://grasswiki.osgeo.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=%E2%9A%A0%EF%B8%8FRobbiebow"/>
	<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/wiki/Special:Contributions/%E2%9A%A0%EF%B8%8FRobbiebow"/>
	<updated>2026-05-26T14:47:22Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=Sqlite_Drop_Column&amp;diff=9698</id>
		<title>Sqlite Drop Column</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=Sqlite_Drop_Column&amp;diff=9698"/>
		<updated>2009-10-13T10:31:38Z</updated>

		<summary type="html">&lt;p&gt;⚠️Robbiebow: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Q:''' How can I drop a column in sqlite-databases?&lt;br /&gt;
&lt;br /&gt;
New '''A:''' GRASS 6.3.cvs contains v.db.dropcol which supports it.&lt;br /&gt;
&lt;br /&gt;
Old '''A:''' It is not possible to drop columns within sqlite using the syntax ALTER TABLE DROP COLUMN [1]. However, there is a workaround for this issue [2]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
BEGIN TRANSACTION;&lt;br /&gt;
CREATE TEMPORARY TABLE t1_backup(a,b);&lt;br /&gt;
INSERT INTO t1_backup SELECT a,b FROM t1;&lt;br /&gt;
DROP TABLE t1;&lt;br /&gt;
CREATE TABLE t1(a,b);&lt;br /&gt;
INSERT INTO t1 SELECT a,b FROM t1_backup;&lt;br /&gt;
DROP TABLE t1_backup;&lt;br /&gt;
COMMIT;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It's obvious that this is a little bit complex. But if you use sqlitebrowser [3]  this can be done with a few mouse-clicks (look under --&amp;gt;modify table for a button &amp;quot;remove field&amp;quot;. See also the Firefox SQLite Manager add-on [4], which is similar to SqliteBrowser.&lt;br /&gt;
&lt;br /&gt;
Alternatively, you could try this approach, which is slightly fewer steps:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
BEGIN TRANSACTION;&lt;br /&gt;
CREATE TABLE t1_new (&lt;br /&gt;
  foo  TEXT PRIMARY KEY,&lt;br /&gt;
  bar  TEXT,&lt;br /&gt;
  baz  INTEGER&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
INSERT INTO t1_new SELECT foo, bar, baz FROM t1;&lt;br /&gt;
DROP TABLE t1;&lt;br /&gt;
ALTER TABLE t1_new RENAME TO t1;&lt;br /&gt;
COMMIT;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [1] http://www.sqlite.org/omitted.html &lt;br /&gt;
* [2] http://www.sqlite.org/faq.html#q11&lt;br /&gt;
* [3] http://sqlitebrowser.sourceforge.net/&lt;br /&gt;
* [4] https://addons.mozilla.org/en-US/firefox/addon/5817&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:FAQ]]&lt;/div&gt;</summary>
		<author><name>⚠️Robbiebow</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=Sqlite_Drop_Column&amp;diff=9697</id>
		<title>Sqlite Drop Column</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=Sqlite_Drop_Column&amp;diff=9697"/>
		<updated>2009-10-13T10:30:57Z</updated>

		<summary type="html">&lt;p&gt;⚠️Robbiebow: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Q:''' How can I drop a column in sqlite-databases?&lt;br /&gt;
&lt;br /&gt;
New '''A:''' GRASS 6.3.cvs contains v.db.dropcol which supports it.&lt;br /&gt;
&lt;br /&gt;
Old '''A:''' It is not possible to drop columns within sqlite using the syntax ALTER TABLE DROP COLUMN [1]. However, there is a workaround for this issue [2]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
BEGIN TRANSACTION;&lt;br /&gt;
CREATE TEMPORARY TABLE t1_backup(a,b);&lt;br /&gt;
INSERT INTO t1_backup SELECT a,b FROM t1;&lt;br /&gt;
DROP TABLE t1;&lt;br /&gt;
CREATE TABLE t1(a,b);&lt;br /&gt;
INSERT INTO t1 SELECT a,b FROM t1_backup;&lt;br /&gt;
DROP TABLE t1_backup;&lt;br /&gt;
COMMIT;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It's obvious that this is a little bit complex. But if you use sqlitebrowser [3]  this can be done with a few mouse-clicks (look under --&amp;gt;modify table for a button &amp;quot;remove field&amp;quot;. See also the Firefox SQLite Manager add-on [4], which is similar to SqliteBrowser.&lt;br /&gt;
&lt;br /&gt;
Alternatively, you could try this approach, which is slightly fewer steps:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
BEGIN TRANSACTION;&lt;br /&gt;
CREATE TABLE t1_new (&lt;br /&gt;
  foo  TEXT PRIMARY KEY,&lt;br /&gt;
  bar  TEXT,&lt;br /&gt;
  baz  INTEGER,&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
INSERT INTO t1_new SELECT foo, bar, baz FROM t1;&lt;br /&gt;
DROP TABLE t1;&lt;br /&gt;
ALTER TABLE t1_new RENAME TO t1;&lt;br /&gt;
COMMIT;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [1] http://www.sqlite.org/omitted.html &lt;br /&gt;
* [2] http://www.sqlite.org/faq.html#q11&lt;br /&gt;
* [3] http://sqlitebrowser.sourceforge.net/&lt;br /&gt;
* [4] https://addons.mozilla.org/en-US/firefox/addon/5817&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:FAQ]]&lt;/div&gt;</summary>
		<author><name>⚠️Robbiebow</name></author>
	</entry>
</feed>