Usingexternis only of relevance when the program you're building consists of multiple source files linked together, where some of the variables define...
分类:
编程语言 时间:
2015-04-08 21:27:16
阅读次数:
239
selecta.nameas表名,max(b.rows)as记录条数fromsysobjectsa,sysindexesbwherea.id=b.idanda.xtype=‘u‘groupbya.nameorderbymax(b.rows)desc
分类:
数据库 时间:
2015-04-08 20:03:00
阅读次数:
146
假设sql是搜索用户A的文章,sql会是这样:select * from table where owner='A';sql注入攻击者会修改用户名来实现攻击,例如把A 改成A' or 1='1组合后的sql语句:select * from table where owner='A' or 1='1'...
分类:
数据库 时间:
2015-04-08 19:40:52
阅读次数:
193
truncate、delete(不带where子句)与drop的异同点:相同之处: 三者均会删除表内的data。不同点: 、truncate与不带where的delete :只删除数据,而不删除表的结构(定义) drop语句将删除表的结构被依赖的约束(constrain),触发器(trigger),...
分类:
其他好文 时间:
2015-04-08 19:39:37
阅读次数:
227
Given a string s and a dictionary of words dict, add spaces in s to construct a sentence where each word is a valid dictionary word.Return all such possible sentences.For example, given
s = “catsanddo...
分类:
其他好文 时间:
2015-04-08 16:25:24
阅读次数:
164
题目:Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.
You may assume no duplicates in the arr...
分类:
其他好文 时间:
2015-04-08 15:05:04
阅读次数:
103
Given a 2D board and a word, find if the word exists in the grid.
The word can be constructed from letters of sequentially adjacent cell, where "adjacent" cells are those horizontally or vertically...
分类:
其他好文 时间:
2015-04-08 13:20:30
阅读次数:
124
今天用sql profiler跟一个底层生成的SQL 的时候,跟到...
分类:
其他好文 时间:
2015-04-08 13:16:54
阅读次数:
259
1.对查询进行优化,应尽量避免全表扫描,首先应考虑在 where 及 order by 涉及的列上建立索引。2.应尽量避免在 where 子句中对字段进行 null 值判断,否则将导致引擎放弃使用索引而进行全表扫描,如:select id from t where num is null可以在num...
分类:
数据库 时间:
2015-04-08 13:04:58
阅读次数:
181
1.对查询进行优化,应尽量避免全表扫描,首先应考虑在 where 及 order by 涉及的列上建立索引。2.应尽量避免在 where 子句中对字段进行 null 值判断,否则将导致引擎放弃使用索引而进行全表扫描,如:select id from t where num is null可以在num...
分类:
数据库 时间:
2015-04-08 12:29:20
阅读次数:
163