Next Previous Up Contents
Next: Match Windows
Up: Destination Panel
Previous: System Browser

#### A.7.2.4 SQL Output Dialogue

SQL table writing dialogue

If you want to write a table to an SQL database, you can use a specialised dialogue to specify the table destination by clicking the SQL Table button in the Save Table window.

This provides you with a list of fields to fill in which define the new table to write, as follows:

Protocol
  The name of the appropriate JDBC sub-protocol. This is defined by the JDBC driver that you are using, and is for instance "`mysql`" for MySQL's Connector/J driver or "`postgresql`" for PostgreSQL's JDBC driver.
Host
  The hostname of the machine on which the database resides (may be "`localhost`" if the database is local).
Database name
  The name of the database.
New table name
  The name of a new table to write into the given database. Subject to user privileges, this will overwrite any existing table in the database which has the same name, so should be used with care.
User name
  The username under which you wish to access the database. This is not strictly necessary if there is no access control for the database in question.
Password
  The password for the given username. Again, whether this is necessary depends on the access policy of the database.
Write Mode
  Options for writing the table to the database. Choose one of:
  create
    A new table is created for the output. If one with the given name already exists, an error results.
  dropcreate
    A new table is created for the output. If one with the given name already exists, it is dropped first.
  append
    The results are appended to an existing table with the given name. If the table has the wrong number or types of columns, an error results.

There are a number of criteria which must be satisfied for SQL access to work within TOPCAT (installation of appropriate drivers and so on) - see the section on JDBC configuration. If you don't take these steps, this dialogue may be inaccessible.

Next Previous Up Contents
Next: Match Windows
Up: Destination Panel
Previous: System Browser

TOPCAT - Tool for OPerations on Catalogues And Tables
Starlink User Note253
TOPCAT web page: http://www.starlink.ac.uk/topcat/
Author email: m.b.taylor@bristol.ac.uk
Mailing list: topcat-user@jiscmail.ac.uk