sql

所属分类:软件设计/软件工程
开发工具:SQL
文件大小:69KB
下载次数:5
上传日期:2008-07-15 12:47:06
上 传 者风尘小子
说明:  动态sql语句基本语法 1 :普通SQL语句可以用Exec执行 eg: Select * from tableName Exec( select * from tableName ) Exec sp_executesql N select * from tableName -- 请注意字符串前一定要加N 2:字段名,表名,数据库名之类作为变量时,必须用动态SQL eg: declare @fname varchar(20) set @fname = FiledName Select @fname from tableName -- 错误,不会提示错误,但结果为固定值FiledName,并非所要。
(Basic grammar dynamic sql statement one: ordinary SQL statement Exec can be used to implement eg: Select* from tableName Exec (select* from tableName) Exec sp_executesql N select* from tableName Please note that the string must be added before the N 2: field names, table name, database name, such as variables, we must use dynamic SQL eg: declare @ fname varchar (20) set @ fname = FiledName Select @ fname from tableName error will not prompt an error, but the result for the fixed value FiledName, not to be.)

文件列表:
not exists用法实例.txt (190, 2007-08-29)
830.txt (1423, 2007-08-30)
830_1.txt (2170, 2007-08-30)
BOOTEX.LOG (2796, 2007-07-28)
case when.txt (1091, 2007-08-29)
CASE的用法.txt (910, 2007-08-11)
charindex.txt (1308, 2007-08-29)
COALESCE.txt (2144, 2007-08-30)
convert cast.txt (3028, 2007-08-29)
cube.txt (1955, 2007-08-29)
datediff.txt (151, 2007-08-29)
isnull.txt (548, 2007-08-29)
isnumric.txt (318, 2007-08-29)
@@rowcount.txt (1300, 2007-08-08)
patindex的用法.txt (2368, 2007-09-01)
rename存储过程.txt (261, 2007-08-14)
replace.txt (328, 2007-08-29)
rowcount.txt (4272, 2007-08-08)
rowcount精华.txt (22344, 2007-08-08)
stuff.txt (176, 2007-08-29)
substring和rtrim.txt (456, 2007-08-29)
unionall.txt (371, 2007-08-29)
遍历数据库.txt (7133, 2007-09-01)
别名.txt (782, 2007-08-29)
查询 时间1.txt (22310, 2007-06-25)
大小写转换.txt (230, 2007-08-29)
动态SQL语句.txt (1393, 2008-01-11)
动态语句.txt (1320, 2007-08-29)
断开并更改数据库名称.txt (137, 2007-08-08)
多表对多表进行统计.txt (878, 2007-08-30)
多列的行转列.sql (2039, 2007-08-18)
多行补充.sql (1746, 2007-08-22)
分布式查询.txt (4135, 2007-08-06)
分割字符串.txt (11539, 2007-08-13)
分组排列进行更新.txt (2537, 2007-10-08)
公交线路问题.txt (6845, 2007-08-29)
合并字符串.txt (4979, 2007-08-29)
获得数据库中表字段的名字.txt (707, 2007-08-29)
极品分组排列进行行转列例题.txt (2901, 2007-10-12)
交叉连接查询corss.txt (356, 2001-10-28)
... ...

近期下载者

相关文件


收藏者