[prev in list] [next in list] [prev in thread] [next in thread]
List: sqlite-users
Subject: Re: [sqlite] : about add sqlite database cloumn
From: Kit <kit.saels () gmail ! com>
Date: 2011-12-23 21:33:52
Message-ID: CAAVKVq_tZz0XtGb1iVyGneuRsDht4Ot8uXRigpp+W=r7JyCfEQ () mail ! gmail ! com
[Download RAW message or body]
2011/12/23 YAN HONG YE <yanhong.ye@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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic