sqlite数据库问题
SELECT (strftime('%Y', 'now') - strftime('%Y', '1990-09-24')) - (strftime('%m-%d', 'now') < strftime('%m-%d', '1990-09-24'))计算结果正常,SELECT (strftime('%Y', 'now') - strftime('%Y', ‘年龄2’)) - (strftime('%m-%d', 'now') < strftime('%m-%d', '年龄2'))计算出来的结果为'null',如果把年龄2的引号去掉会报错: Error while executing SQL query on database 'test': no such column: 年龄2
有老哥帮忙解答一下吗。
反引号是不能去掉的,专门为了字段设置的~~
页:
[1]