[python-sybase] how to update a table

hopfgartner hopfgartner at rolmail.net
Mon, 09 Dec 2002 10:27:35 +0100


On Sun, 8 Dec 2002 00:42:56 -0800 (PST)
 ghostdog <s802645999@yahoo.com> wrote:
> 
> hi
> 
> how do i update a table using the execute() method?
> 
> cheers
> 

Should be simply:


import Sybase

sql_conn = Sybase.connect(dsn, user, password, database)
sql_cursor = sql_conn.cursor()
sql_cursor.execute('UPDATE my_table SET my_col = whatever
WHERE where_condition')


Peter