tags:

views:

30

answers:

2

how to create a database btable from unix shell?

and how to access the contents of the data table or to add to the table. can i create a table in ms-acces and use it throug shell?

or please sugest some e-books or sites to refer

A: 

In general, most database systems supported by unix have a command line client that you can use. Use the standard shell redirection tools to send the commands you'd like to execute to the program.

For MySQL, take a look at the MySQL Command-Line Tool. For Firebird, look at isql.

For example you could create a table in firebird like this:

   echo CREATE TABLE MyTable \( MyField VARCHAR\(80\) \) | isql -user user -password secret mydatabase
garethm
A: 

You will need the username and password for the database, and then you can pass commands using a command line interface, as long as a CLI is supported (like it is by mysql). In order to issue and "UPDATE" command, or create tables, you will have to make sure you have write access. The first answer gives you an example of this for firebird. Mysql syntax is very similar.

Since you are talking about M$ access, I'm guessing it is a SQL server instance. If you have python installed (pretty standard on *nix boxes nowadays) I think you can use sqlcmd to connect to a sql server but I've never tried it.

SDGuero