易截截图软件、单文件、免安装、纯绿色、仅160KB
热门标签: c c# c++ asp asp.net linux php jsp java vb Python Ruby mysql sql access Sqlite sqlserver delphi javascript Oracle ajax wap mssql html css flash flex dreamweaver xml
 最新文章 : sql

谷歌傻瓜式SQL注射(Google dorks sql injection)

Google dorks sql injection:
inurl:index.php?id=  
inurl:trainers.php?id=  
inurl:buy.php?category=  
inurl:article.php?ID=  
inurl:Play_old.php?id=  
inurl:declaration_more.php?decl_id=  
inurl:Pageid=  
inurl:games.php?id=  
inurl:Page.php?file=  
inurl:newsDetail.php?id=  
inurl:gallery.php?id=  
inurl:article.php?id=  
inurl:show.php?id=  
inurl:staff_id=  
inurl:newsitem.php?num=  
inurl:readnews.php?id=  
inurl:top10.php?cat=  
inurl:historialeer.php?num=  
inurl:reagir.php?num=  
inurl:Stray-Questions-View.php?num=  
inurl:forum_bds.php?num=  
inurl:game.php?id=  
inurl:view_product.php?id=  
inurl:newsone.php?id=  
inurl:sw_comment.php?id=  
inurl:news.php?id=  
inurl:av ......

在SQL Server 2005中用存储过程实现搜索功能


现在很多网站都提供了站内的搜索功能,有的很简单在SQL语句里加一个条件如:where names like ‘%words%’就可以实现最基本的搜索了。
    我们来看看功能强大一点,复杂一点的搜索是如何实现的(在SQL SERVER200/2005通过存储过程实现搜索算法)。
    我们把用户的搜索可以分为以下两种:
    1.精确搜索,就是把用户输入的各个词语当成一个整体,不分割搜索.
    2.像百度,GOOGLE一样的,按空格把输入的每一个词分离,只要包含这些词语,而不管出现的顺序,称为ALL-Word Search.
    3.对输入的词只要有一个出现就为匹配 称为Any-Word Search
一、对搜索结果进行排序的算法
   
在前面提到的LIKE语句最大的问题就是搜索的结果是没有经过排序的,我们不知道结果出现在的顺序是如何的,因为它是随机的。像百度,GOOGLE都会对
结果用算法进行排序再显示的.好我们也来建立一个简单的排序法。一个很常见的算法是计算关键词在被搜索内容中出现的次数,次数最多的排在结果的第一位。我
们的是在存储过程中实现这个算法的,而在SQLSERVER中没有提 ......

SQL安装问题 无法获取ASPNET账户的系统账户信息

安装SQL Server2005 问题信息:
“SQL Server 安装程序无法获取 ASPNET 帐户的系统帐户信息”
解决办法:
用aspnet_regiis实用工具卸载和重新安装一下就可以了。
具体的操作:
1、进入CMD:
C:\windows\microsoft.net\framework\v2.0.50727文件夹下,运行aspnet_regiis -u卸载
然后运行aspnet_regiis -i 重新安装,上述问题即可解决。
2、C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis -u
CMD:
开始卸载 ASP.NET (2.0.50727);
ASP.NET (2.0.50727) 卸载完毕。
安装程序检测到操作过程中出现了一些错误。有关详细信息,请查看安装程序
DOCUME~1\ADMINI~1\LOCALS~1\Temp\ASPNETSetup_00000.log
3、C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis -i
CMD:
开始安装 ASP.NET (2.0.50727);
ASP.NET (2.0.50727)安装完毕。
再安装SQL Server 2005 ......

介绍SQL Server 2005的CROSS Apply

Cross Apply使表可以和表值函数结果进行join, 这样表值函数的参数就可以使用一个结果集,而不是一个标量值,下面是book online的原文,有例子,有解释。
The APPLY operator allows you to invoke a table-valued function for each row returned by an outer table expression of a query. The table-valued function acts as the right input and the outer table expression acts as the left input. The right input is evaluated for each row from the left input and the rows produced are combined for the final output. The list of columns produced by the APPLY operator is the set of columns in the left input followed by the list of columns returned by the right input.
There are two forms of APPLY: CROSS APPLY and OUTER APPLY. CROSS APPLY returns only rows from the outer table that produce a result set from the table-valued function. OUTER APPLY returns both rows that produce a result set, and rows that do not, with NULL values in the columns produced by the table-valued function.
As an example, consider the foll ......

SQL Server 2005中新增的功能强大的窗口函数

原文地址:http://www.cnblogs.com/changhai0605/articles/1276319.html
Oracle的请参考:http://zonghl8006.blog.163.com/blog/static/4528311520083995931317/
1.简介:
SQL Server 2005中新增的窗口函数帮助你迅速查看不同级别的聚合,通过它可以非常方便地累计总数、移动平均值、以及执行其它计算。
窗口函数功能非常强大,使用起来也十分容易。可以使用这个技巧立即得到大量统计值。
窗口是用户指定的一组行。 开窗函数计算从窗口派生的结果集中各行的值。
2.适用范围:
排名开窗函数和聚合开窗函数.
也就是说窗口函数是结合排名开窗函数或者聚合开窗函数一起使用
OVER子句前面必须是排名函数或者是聚合函数
3.例题:
--建立订单表
create table SalesOrder(
OrderID int,            --订单id
OrderQty decimal(18,2)  --数量
)
go
--插入数据
insert into SalesOrder
select 1,2.0
union all
select 1,1.0
union all
select 1,3.0
union all
select 2,6.0
union all
select 2,1.1
union all
select 3,8.0
union all
select 3,1.1
union all
select 3,7.0
go
--查询得 ......

关于程序代码中的SQL语句

在程序中有些查询语句相对较长,可以将语句单独写在一个XXX.sql文件中,在程序中读取SQL文件
具体涉及到
import java.io.File;
import org.apache.commons.io.FileUtils;
import java.net.URL;
URL resourceUrl = XXXX.class.getClassLoader().getResource(SQL_PATH+sqlName);//SQL_PATH具体SQL文件存在路径,sqlName即SQL文件名,  XXXX当前类
File sqlFile = new File(resourceUrl.getPath());  //读取SQL文件
String sql = FileUtils.readFileToString(sqlFile, "UTF-8"); //得到SQL语句 ......
总记录数:4346; 总页数:725; 每页6 条; 首页 上一页 [321] [322] [323] [324] 325 [326] [327] [328] [329] [330]  下一页 尾页
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号