msql insert new record
Jim Ault
JimAultWins at yahoo.com
Sun Oct 15 21:15:41 EDT 2006
On 10/15/06 4:14 PM, "Robert Mann" <robmann at gp-racing.com> wrote:
> have a update code that works great, with some held form this list
>
> put "UPDATE rider SET "&updateColValListOf123Pairs&" WHERE record_id = '" &
> fld "record_id" & "'" into tSQL
>
> how would I change this to insert a new record
>
> put "INSERT INTO rider "&updateColValListOf123Pairs&" " into tSQL
>
> the above does not seem to work?
>
UPDATE & INSERT INTO don't use the same format
INSERT INTO does not use "="
on of the many reference pages on the web
http://w3schools.com/sql/default.asp
--------------------------------
INSERT INTO table_name
VALUES (value1, value2,....)
--which puts the values into the first col, second, etc.
You can also specify the columns for which you want to insert data:
INSERT INTO table_name (column1, column2,...)
VALUES (value1, value2,....)
---------------
UPDATE table_name
SET column_name = new_value
WHERE column_name = some_value
> put "UPDATE rider SET "&updateColValListOf123Pairs&" WHERE record_id = '" &
> fld "record_id" & "'" into tSQL
>
Jim Ault
Las Vegas
More information about the use-livecode
mailing list