Craig
Craig

Reputation: 36816

WebSQL check value is integer

I have a WebSQL Sqlite database on a Android device via PhoneGap. I want to run a query to delete all rows where the Id is not an integer. So I would like to run something like

DELETE FROM Client WHERE NOT IsInt(Id)

Is there an easy way to do this?

Upvotes: 0

Views: 138

Answers (1)

CL.
CL.

Reputation: 180060

Use typeof:

DELETE FROM Client WHERE typeof(Id) <> 'integer'

Upvotes: 1

Related Questions