2011/12/23 YAN HONG YE <yanhong...@mpsa.com>:
> I have a question about C binding for sqlite, I have a table like this:
>
> Name    Price1  Price2  Sum
> A1      23      231
> A2      22      12
> A3      21      223
>
> how to use functin
>  int  myfunc() {
> int tt=0;
> if (price1>2) tt++;
> if (price2>1) tt++;
> if (price2>12) tt++;
> return tt
> }
>
> to put function result into  my table last added cloumn use sqlite in c code?

SELECT (price1>2)+(price2>1)+(price2>12) AS tt FROM table;
-- 
Kit
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to