易截截图软件、单文件、免安装、纯绿色、仅160KB

写了一个稍微复杂点的sql心得

select pcode from (
        select h.k,h.d,h.m,h.u,l.areacode,
               l.areacode||substr(h.u,4,length(h.u))||h.k pcode
         from(
        select j.k,j.d,j.m,j.u from(
        select lpad(f,3,0) as k,d, m,u from(
        select xx.areacode d,nvl(count(cy.pcode),'001')f,mx.m,mx.shopcode u
        from cz_s_jtxx xx, cz_s_jtcy cy , 
          ( select a.m,d.shopid,d.shopcode from
        (select shopid m,parentid from s_shop where shoptype=1) a,
        (select shopid,parentid from s_shop where shoptype=2) b,
        (select shopid,parentid from s_shop where shoptype=3)c,
        (select shopid,parentid,shopcode from s_shop where shoptype=4)d
        where d.parentid=c.shopid
        and c.parentid=b.shopid
        and b.parentid=a.m
        and d.shopid=14725) mx
        where xx.pcode = cy.pcode
        and xx.areacode=mx.shopid
        group by xx.areacode,mx.m,mx.shopcode))j)h, 
        (select areacode,shopid  from cz_s_area) l 
       where h.m=l.shopid)
首先 从最里层的 sql说起:
select a.m,d.shopid,d.shopcode from
        (select shopid m,parentid from s_shop where shoptype=1) a,
    


相关文档:

在 MS SQL Server 中删除表

-- 说明:
-- 1. 要删除表 table_name, 须先判断该表是否正被数据库中其它表所引用.
-- 2. 如果未被引用, 可直接 DROP TABLE table_name; 否则必须先删除引用表的约束, 再 DROP TABLE table_name.
-- 3. 另外, table_name 是否正引用其它表的情况无须考虑.


-- 创建主表
CREATE TABLE tParent
......

SQL经典组合查询

从博客园中看到一篇文章,介绍大软件公司面试时常常会出的两道SQL题(见附录)。
我觉得受益很多,在此之前,我一直觉得,SQL2008似乎提供了这方面的支持,但更低的版本,包括2005,非游标做不出来(水平够菜)。总结心得如下:
1、    强大的group by
1  select stdname,
2  isnull( ......

PHP SQL 注入攻击的技术实现以及预防办法

 最近在折腾 PHP + MYSQL
的编程。了解了一些 PHP SQL 注入攻击
的知识,于是写了这篇文章 http://www.xiaohui.com/weekly/20070314.htm,总结一下经验。在我看来,引发 SQL 注入攻击
的主要原因,是因为以下两点原因:
  1. php 配置文件 php.ini 中的 magic_quotes_gpc
选项没有打开,被置为 off
  2. 开发 ......

SQL SERVER2008安全性


概述
Microsoft SQL Server 2008 提供了有助于有效管理安全性功能配置、强身份验证和访问控制的安全性增强功能、功能强大的加密和密钥管理功能,以及增强型审核功能。
重大的新功能
使用基于策略的管理,针对企业内的数据来管理及检测不符合安全策略的情况
不需修改应用程序即可使用透明数据加密来加密数据
使用可扩 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号