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

SQL命令查询视图定义语句

用SQL命令查询视图定义语句,可以用以下两种方法:
sp_helptext '视图名' --多行显示
SELECT text from sysobjects so INNER JOIN syscomments sc ON so.id=sc.id  WHERE so.id=OBJECT_ID('视图名')--单行显示


相关文档:

SQL精华收集

order by 的数值型灵活使用
select * from table_a where id=p_id order by decode(函数,'asc',1,'desc',-1)*jsny;
控制试图的访问时间:
6.create view ...
as
select ... from where exists(select x from dual where sysdate>=8:00am and sysdate<=5:00pm)
妙用decode实现排序
select * from tabnam ......

SQL 按组别过滤指定条件的首行记录

源贴:http://topic.csdn.net/u/20100417/19/ebdc216a-acc9-4e04-80f3-dbada0b4f3fe.html?74846
数据类型:
Code char(6)
CreateTime datetime
Price float
Status bit
数据如下:
Code       CreateTime        Price Status
031002 2008-10-17 ......

Java如何防sql注入

采用预编译语句集,它内置了处理SQL注入的能力,只要使用它的setString方法传值即可:
          String sql= "select * from users where username=? and password=?;
          PreparedStatement preState = conn.prepare ......

SQL Server 2000数据库的定时备份设置

利用SQL2000的定时备份功能,能很好对服务器上的重要数据信息进行完整的定时备份,以便在服务器瘫痪或数据库出现损坏时及时的进行恢复工作,以确保平时的工作能正常的进行。下面向大家介绍一下SQL2000定期备份的设置方法,具体如下:
1.         打开SQL2000的企业管理器
2.&nbs ......

sql server 中常用的日期函数

从dateTime类型数据中获取季度:
select   cast(datepart(q,sign_date)   as   varchar(2))+'季度'    
一.sql server日期时间函数
1.   当前系统日期、时间
     select getdate()  
2. dateadd   在向指定日期加上一段时间 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号