sqlite????? boolean?????СС????
???????????? ???????[ 2014/4/16 9:49:08 ] ????????????? boolean
??????????????????:
????SQLite does not have a separate Boolean storage class. Instead?? Boolean values are stored as integers 0 (false) and 1 (true).
????sqlite?????????е?????Boolean?洢??Booean???0(false)??1(true)???洢.
??????????????????????? ???boolean ?????????? 0(false) 1(true) ?? null????????????
???????????в??????????????????????.????? ???????
????select * from stu where flag ="?????"
?????????name ?a9 ????.
insert into stu (name??flag) values ('a1'??'true'); -- 0
insert into stu (name??flag) values ('a2'??'ture'); -- 0
insert into stu (name??flag) values ('a3'??1); -- 1
insert into stu (name??flag) values ('a4'??'null'); --0
insert into stu (name??flag) values ('a5'??'1'); --1
insert into stu (name??flag) values ('a6'??null); -- null
insert into stu (name??flag) values ('a7'??'2'); --1
insert into stu (name??flag) values ('a8'??15); --1
insert into stu (name??flag) values ('a9'??"?????"); --0
???????????????????????е?sql????????????
insert into [stu] values('a1'?? 0);
insert into [stu] values('a2'?? 0);
insert into [stu] values('a3'?? 1);
insert into [stu] values('a4'?? 0);
insert into [stu] values('a5'?? 1);
insert into [stu] values('a6'?? null);
insert into [stu] values('a7'?? 1);
insert into [stu] values('a8'?? 1);
insert into [stu] values('string'?? 0);
insert into [stu] values('string2'?? 0);
insert into stu (name??flag) values ('a9'??0); --0
???????? ???? sqlite ??????? ?????洢?????boolean????????? ????????????? ?????????????????????int?????????.
??????????????????????:
????-- ?????????int??????????0??? true?? ?????????????0??? false(0)
????-- int ??long double ???????0?false?? ????>=1??? true(1)
????-- ???????????? null? null??????
????ps:??δ??????????????????????????????????2????????????????.
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11