摘要: 在SQLite下我测试了SELECT 'A'+'B'结果为0select "A"+"1" 结果为1select "A"+1 结果为1select 2+1 结果为3感觉在“+”运算中,SQLite将字符串非数字串都当作0处理了加号就是针对数字的,所以应该用|| 来拼接字符串的结果select wid||word from table1;用这个拼接可以实现:select count(distinct clum1||clum2) from talbe1 多列的去重计数 阅读全文
posted @ 2012-10-08 17:36 ``炯`` 阅读(2309) 评论(0) 推荐(0) 编辑
摘要: 如下,我们来定义Week的枚举:if(typeof WeekDay == "undefined"){var WeekDay = {};WeekDay.Sunday = 0;WeekDay.Monday = 1;WeekDay.Tuesday = 2;WeekDay.Wedesay = 3;WeekDay.Thursday = 4;WeekDay.Friday = 5;WeekDay.Saturday = 6;}测试如下:alert(WeekDay.Monday); // -----> Output: 1当然,我们有更为直观的方式。以定义DOM文档节点类型为例,定义方式 阅读全文
posted @ 2012-10-08 13:35 ``炯`` 阅读(1056) 评论(0) 推荐(0) 编辑