1、错误描述1 queries executed, 0 success, 1 errors, 0 warnings
查询:SELECT a.createUserId AS typeId, (SELECT COUNT(c.id) FROM t_aps c WHERE c.`status` IN (2, 5) AND c.createTime >= start...
错误代码: 1247
Refe...
分类:
其他好文 时间:
2015-07-21 20:42:40
阅读次数:
832
1、错误描述1 queries executed, 0 success, 1 errors, 0 warnings
查询:select count(t.id),t.`createUserId` from t_acs_ints t where t.id not in (SELECT t1.ionId FROM t_acs_cont t1, t_ac...
错误代码: 1054
Unknown c...
分类:
其他好文 时间:
2015-07-21 20:41:58
阅读次数:
206
子查询(Subquery)是指出现在其他SQL语句内的SELECT子句例如:SELECT * FROM t1 WHERE col1 = (SELECT col2 FROM t2);其中SELECT * FROM t1,称为Outer Query/Outer Statement(外层查询)SELECT...
分类:
其他好文 时间:
2015-07-21 20:16:46
阅读次数:
103
具体要注意的:1.应尽量避免在 where 子句中对字段进行 null 值判断,否则将导致引擎放弃使用索引而进行全表扫描,如:select id from t where num is null可以在num上设置默认值0,确保表中num列没有null值,然后这样查询:select id from t...
分类:
其他好文 时间:
2015-07-21 20:11:37
阅读次数:
107
1 --使用表达式更新一个单列的值 2 UPDATE employee 3 SET salary = salary*1.1 4 WHERE department_id = 90 5 6 --使用子查询更新一个单列的值 7 UPDATE employee 8 SET salary ...
分类:
其他好文 时间:
2015-07-21 18:37:07
阅读次数:
93
1 DELETE FROM table1 WHERE ...
分类:
其他好文 时间:
2015-07-21 18:33:52
阅读次数:
64
select *from ( select *, row_number() over (partition by Code order by code desc ) as seq from GNS_Goods ) as t where seq=1
分类:
数据库 时间:
2015-07-21 14:39:35
阅读次数:
200
1Given an arrayof integers, find two numbers such that they add up to a specific targetnumber.The functiontwoSum should return indices of the two numbers such that they add up to thetarget, where inde...
分类:
其他好文 时间:
2015-07-21 12:56:09
阅读次数:
93
题目:
Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.
For example:
Given the below binary tree and sum = 22,
5
/...
分类:
编程语言 时间:
2015-07-21 12:54:55
阅读次数:
127
SQL与NoSQL的CRUD对比
flyfish 2015-7-21
Create, Read, Update and Delete (CRUD)
SQL方式
查
SELECT 列名称 FROM 表名称
SELECT * FROM 表名称
SELECT 列名称 FROM 表名称 WHERE 列 运算符 值
增
INSERT...
分类:
数据库 时间:
2015-07-21 12:49:55
阅读次数:
134