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

SQL常用函数之三 REPLICATE () ?


按指定次数重复字符表达式。
语法
REPLICATE ( character_expression, integer_expression)
参数
character_expression
字符数据型的字母数字表达式,或者可以隐式转换为 nvarchar 或 ntext 的其他数据类型的字母数字表达式。
integer_expression
可以隐式转换为 int 的表达式。如果 integer_expression 为负,将返回空字符串。
返回值
nvarchar 或 ntext
1 :Select Replicate('abc',2) ----------------abcabc
2 :Select Replicate('abc',-2) ----------------null
3 :Select Replicate('abc',0)--------------- 无


相关文档:

数据库相关:JDBC直连SQL Server 2005

来自:http://www.cnblogs.com/mikeye/archive/2007/04/13/711878.html
和来自:http://tech.ccidnet.com/art/3539/20080225/1370107_1.html
用eclipse来进行Microsoft SQL Server 2005数据库方面的开发,先把MS SQL Server 2005 JDBC Driver的驱动下载后加入工程文件的类库中;然后写URL字符串。根据以往的写法写入:url = ......

sql server 2000 日期函数(联机帮助)

1.DATEADD函数
  在向指定日期加上一段时间的基础上,返回新的 datetime 值。
语法
DATEADD ( datepart , number, date )
参数
datepart
日期部分
缩写
Year
yy, yyyy
quarter
qq, q
Month
mm, m
dayofyear
dy, y
Day
dd, d
Week
wk, ww
Hour
hh
minute
mi, n
second
ss, s
millisecond
m ......

sql语句总结二

sql精妙用法
文章分类:数据库
说明:复制表(只复制结构,源表名:a 新表名:b)
select * into b from a where 1<>1
说明:拷贝表(拷贝数据,源表名:a 目标表名:b)
insert into b(a, b, c) select d,e,f from b;
说明:显示文章、提交人和最后回复时间
select a.title,a.username,b.adddate ......

SQL 防注入式攻击

1、检查是否有非法字符
public static boolean sql_inj(String str)
{
    String inj_str = "'|and|exec|insert|select|delete|update|
count|*|%|chr|mid|master|truncate|char|declare|;|or|-|+|,";
//这里的东西还可以自己添加
String[] inj_stra=inj_str.split("\\|");
    for ......

SQL-查询所有触发器

----查看所有角本
Create table #y (txt text)
select name, iid = identity(int,1,1) into #x from SysObjects where xtype = 'TR'
declare @i int, @max int
declare @name varchar(40)
set @i = 1
select @max = max(iid) from #x
while @i <= @max
begin
    select @name = name from #x w ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号