On 3 Jun 2009, at 7:05am, liubin liu wrote:

> the first step is to tell if there is the data in the table.
> if the answer is not, I want to insert a row of data into the table
> if the answer is yes, I need to update the row of data acccording to  
> the
> data inputting from me.

INSERT OR REPLACE INTO table (columns) VALUES (values)

This will use the columns and indices you have already defined as  
UNIQUE to decide whether it should INSERT a new row or REPLACE an  
existing one.  So take care in creating UNIQUE columns or a UNIQUE  
index that does what you want.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to