v.db.renamecolumn.html 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <h2>DESCRIPTION</h2>
  2. <em>v.db.renamecolumn</em> renames a column in the attribute table connected
  3. to a given vector map. It automatically checks the connection for the specified
  4. layer.
  5. <h2>NOTES</h2>
  6. If the map table is connected through the DBF or SQLite drivers, the renaming
  7. is internally done by adding a new column with new name, transferring the contents
  8. of the old column to the new column and dropping the old column. This is needed
  9. as DBF or SQLite do not support "ALTER TABLE" command to rename columns. Due to
  10. this the renamed column is found as last column of the table, it's original position
  11. cannot be maintained.
  12. <p>
  13. The SQLite driver will exit with an error if the column rename involves only a change of
  14. case, i.e., upper-to-lowercase, or lower-to-uppercase. The SQLite protocol considers "NAME"
  15. and "name" to be identical column names. In cases like these, the user should rename the original
  16. column to an intermediary name, then rename the intermediary to the final name.
  17. <p>
  18. <h2>EXAMPLES</h2>
  19. Renaming a column:<br>
  20. <div class="code"><pre>
  21. v.info -c myroads
  22. v.db.renamecolumn myroads column=label,roadtype
  23. v.info -c myroads
  24. </pre></div>
  25. <h2>SEE ALSO</h2>
  26. <em><a HREF="db.execute.html">db.execute</a></em>,
  27. <em><a HREF="v.db.addcolumn.html">v.db.addcolumn</a></em>,
  28. <em><a HREF="v.db.addtable.html">v.db.addtable</a></em>,
  29. <em><a HREF="v.db.connect.html">v.db.connect</a></em>,
  30. <em><a HREF="v.db.dropcolumn.html">v.db.dropcolumn</a></em>,
  31. <em><a HREF="v.db.droptable.html">v.db.droptable</a></em>,
  32. <em><a HREF="v.db.select.html">v.db.select</a></em>,
  33. <em><a HREF="v.db.update.html">v.db.update</a></em>
  34. <h2>AUTHOR</h2>
  35. Markus Neteler
  36. <p><i>Last changed: $Date$</i>