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

sql 命名问题

正确的:select isnull(money,0) from (select  sum(money) as money,3 as b from zhangbenjilu where datepart(month,usedatetime)=3) as a
错误的:select isnull(money,0) from (select  sum(money) as money,3  from zhangbenjilu where datepart(month,usedatetime)=3)


相关文档:

asp.net连接sql用的SqlHelper

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Collections;
using System.Data.SqlClient;
namespace DAL
{
    /// <summary>
    /// 数据库的通用访问代码
    /// 此类为抽象类,不允许实例化,在应用 ......

sql server if嵌套基本语法

例子:
if 1<>1
begin
   if  5<0
      begin
            print('失败')
       end
       else begin
     &nbs ......

sql中获取字符串中的字母,数字,非数字函数

sql获取字母:
CREATE FUNCTION dbo.F_Get_STR (@S VARCHAR(100))
RETURNS VARCHAR(100)
AS
BEGIN
    WHILE PATINDEX('%[^a-z]%',@S)>0
          BEGIN
              &n ......

ASP.NET 中如何防范SQL注入式攻击

一、什么是SQL注入式攻击?
  所谓SQL注入式攻击,就是攻击者把SQL命令插入到Web表单的输入域或页面请求的查询字符串,欺骗服务器执行恶意的SQL命令。在某些表
单中,用户输入的内容直接用来构造(或者影响)动态SQL命令,或作为存储过程的输入参数,这类表单特别容易受到SQL注入式攻击。常见的SQL注入式攻
击过程类如: ......

sql简单函数用法

定义函数
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
ALTER function [dbo].[FunJSLC](@carid bigint,@date datetime)
returns decimal
as
begin
declare @jslc decimal
set @jslc=(select JSLC from BYReMIn where iCarID=@carid and dtDate=@date)
return(@jslc)
end
存储过程应用函数
set ANSI_NULLS ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号