随笔分类 -  sql server

sql server data base
摘要:Code Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->use pubs select cast( ((100-royalty)/100) as money) from titles 阅读全文
posted @ 2009-01-06 09:56 shuang 阅读(108) 评论(0) 推荐(0)
摘要:-----from internet web------ 利用T-SQL语句,实现数据库的备份与还原的功能 体现了SQL Server中的四个知识点: 1. 获取SQL Server服务器上的默认目录 2. 备份SQL语句的使用 3. 恢复SQL语句的使用,同时考虑了强制恢复时关闭其他用户进程的处理 4. 作业创建SQL语句的使用 /*1.--得到数据库的文件... 阅读全文
posted @ 2009-01-03 16:52 shuang 阅读(1016) 评论(0) 推荐(0)
摘要:Code Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->CREATE TRIGGER trigger_name ON { table | view } [ WITH ENCRYPTION ] { { { FOR | ... 阅读全文
posted @ 2008-12-07 18:16 shuang 阅读(143) 评论(0) 推荐(0)
摘要:在 SQL Server 2000 版本中,如果我们要通链接服务器(sql linked server)访问远程数据,在使用远程数据库对象的时候,需要指定远程对象的全名称。比如,像下面的查询: select top 10 * from [192.168.1.110].AdventureWorks.Production.Product SQL Server 2005 中增加了 synonym ... 阅读全文
posted @ 2008-11-23 22:47 shuang 阅读(351) 评论(0) 推荐(0)
摘要:http://technet.microsoft.com/zh-cn/library/ms173748.aspx Code Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->sp_configure 'Database Mail XPs'--察看 e... 阅读全文
posted @ 2008-11-03 11:42 shuang 阅读(423) 评论(0) 推荐(0)
摘要:SET DATEFIRST 将一周的第一天设置为从 1 到 7 之间的一个数字。 通过select @@datefirst 可以查看当前的设置 这个@@datefirst是可以修改的: -- SET DATEFIRST to U.S. English default value of 7. SET DATEFIRST 7 SELECT CAST('99-1-1' AS datetime), D... 阅读全文
posted @ 2008-09-20 20:26 shuang 阅读(798) 评论(0) 推荐(0)