[prog] mysql
Becky L. Norum
bnorum at coe.neu.edu
Thu Nov 6 09:55:24 EST 2003
On Wed, 5 Nov 2003, Saint-Wolfe wrote:
> I have a file called info.sql which contains the following:
>
> select "INSERT INTO address (p_code, addr_type, city, state) VALUES (",
> f_code, ",'", 'Current', "','", 'Albany', "','", 'NY', "');" from
> faculty
wolf,
It looks like you have some basic SQL issues. I'd suggest doing a
tutorial on SQL (there is a great one at http://www.sqlcourse.com/) to
clarify the differences between different kinds of SQL statements.
For example, SELECT and INSERT are different functionalities.
To insert a new row, you would use something like:
INSERT INTO address (p_code, addr_type, city, state)
VALUES ('mycode', 'current', 'Albany', 'NY');
To select all rows from the address table:
SELECT p_code, addr_type, city, state
FROM address;
If you have more questions after going through the tutorial, please go
ahead and ask!
Regards,
Becky
More information about the Programming
mailing list