On Fri, Feb 10, 2012 at 4:53 PM, Richard Hipp <d...@sqlite.org> wrote:

> On Fri, Feb 10, 2012 at 6:11 AM, Max Vlasov <max.vla...@gmail.com> wrote:
>
> > Hi,
> > working with sqlite and mysql, noticed that they're different in regard
> of
> > mixed types.
> >  Select '24' < 25
> >  Select 24 < 25
> > have the same results in MySql and different sqlite.
> >
>
> In the statement:
>
>    SELECT '25' < 25;
>
> There are no columns, only literals.  And hence no affinity is applied.
>
>
>

So if a string looks like a numeral it should be treated as numeral by
sqlite?

The following db and query returns results bigger than 5, is this ok?

CREATE TABLE [testtable] (
[Id] INTEGER PRIMARY KEY AUTOINCREMENT,
[value] VARCHAR(200)
);
INSERT INTO "testtable" VALUES(4,'-3');
INSERT INTO "testtable" VALUES(5,'-2');
INSERT INTO "testtable" VALUES(11,'33');
INSERT INTO "testtable" VALUES(12,'44');
DELETE FROM sqlite_sequence;
INSERT INTO "sqlite_sequence" VALUES('testtable',20);
SELECT value from testtable WHERE Value  <= 5
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to