随笔分类 -  Sql

about sql Statement and so on
---sql server中的一个函数COALESCE-返回其参数中的第一个非空表达式
摘要:---sql server中的一个函数COALESCE-返回其参数中的第一个非空表达式 阅读全文

posted @ 2009-05-01 17:22 simhare 阅读(364) 评论(0) 推荐(0)

----聚集索引--与非聚集索引
摘要:----聚集索引--与非聚集索引 阅读全文

posted @ 2009-05-01 16:30 simhare 阅读(213) 评论(0) 推荐(0)

---通过 SQL Server 2005 索引视图提高性能
摘要:---通过 SQL Server 2005 索引视图提高性能 阅读全文

posted @ 2009-05-01 15:24 simhare 阅读(379) 评论(0) 推荐(0)

--SQL Server 2005 User and Schema(用户与架构)
摘要:SQL Server 2005 User and Schema(用户与架构) 阅读全文

posted @ 2009-04-20 18:17 simhare 阅读(322) 评论(0) 推荐(0)

MySql 基础知识 001
摘要:MYSQL导入(执行)Sql脚本 MYSQL导入(执行)Sql脚本 例如:我的用户名是root 密码是123 sql脚本存在C盘 名字为test.sql 数据库为test 有两种方法可以执行脚本 1:打开CMD输入以下命令(不需要转换目录) >mysql -u root -p123 进入MYSQL后 mysql>use test; mysql> source c:/test.sql ok执行完... 阅读全文

posted @ 2008-12-03 16:33 simhare

---sql server--删除重复记录
摘要:---sql server--删除重复记录 阅读全文

posted @ 2008-09-12 21:04 simhare 阅读(412) 评论(0) 推荐(0)

sql datetime 比较
摘要:Code Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->select datediff(day,'2008-09-09','2008-9-7') Code Code highlighting produced by Actipro CodeH... 阅读全文

posted @ 2008-09-12 11:53 simhare 阅读(700) 评论(0) 推荐(0)

常用sql语句
摘要:说明:复制表(只复制结构,源表名:a 新表名:b) SQL: select * into b from a where 11 说明:拷贝表(拷贝数据,源表名:a 目标表名:b) SQL: insert into b(a, b, c) select d,e,f from b; ++++++++ 说明:日程安排提前五分钟提醒 SQL: sele... 阅读全文

posted @ 2008-09-11 23:07 simhare 阅读(141) 评论(0) 推荐(0)

BCP从sql server 导出 excel
摘要:Code Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->1 exec master..xp_cmdshell 'bcp "select top 1 * from Northwind..Customers" queryout c:\Temp.xls -... 阅读全文

posted @ 2008-09-11 22:30 simhare 阅读(515) 评论(0) 推荐(0)

sa登录时的各种错误
摘要:一·错误提示: 无法连接到服务器 服务器:消息18452, 级别16,状态1 [Microsoft][ODBC SQL Server Driver][SQL Server]用户‘sa’登陆失败.原因:未与信任SQLServer连接相关联 该错误产生的原因是由于SQL Server使用了“仅 Windows的身份验证... 阅读全文

posted @ 2008-08-31 20:39 simhare 阅读(527) 评论(0) 推荐(0)

服务器上有两个版本的数据库,sa登录
摘要:sql server访问时用dataSource=. 不能登录,最后的原因是服务器上装有sql2000 和sql2005两个数据库,而sql 2000的sa的密码不为空。 估计asp.net程序也不知道该连那个数据库。 阅读全文

posted @ 2008-08-28 08:41 simhare 阅读(181) 评论(0) 推荐(0)

rickie sql server 数据库清理
摘要:SQL SERVER数据库清理DB LOG 日志的逻辑文件名是DBNAME_LOG,数据库DBNAME: USE DBNAME BACKUP LOG DBNAME WITH NO_LOG --截断事务日志 GO OPTION 1: DBCC SHRINKFILE(DBNAME_LOG,10) --收缩事务日志 GO OPTION 2... 阅读全文

posted @ 2008-08-26 20:35 simhare 阅读(177) 评论(0) 推荐(0)

sql ntext数据类型
摘要:ntext和varchar 都不支持where isnull(solution,'') '' 这样的操作。 至少ntext是绝对不行。 nvarchar(4000)就可以。 阅读全文

posted @ 2008-08-26 13:43 simhare 阅读(884) 评论(0) 推荐(0)

sql server 管道的另一端上无任何进程
摘要:sql server 管道的另一端上无任何进程 阅读全文

posted @ 2008-08-10 09:26 simhare 阅读(5013) 评论(0) 推荐(0)

sa登录失败!错误号18456
摘要:sa登录失败!错误号18456 阅读全文

posted @ 2008-08-10 09:22 simhare

sql server DML 语句不能撤销
摘要:sql server DML 语句 阅读全文

posted @ 2008-06-02 17:23 simhare

SQL删除一个表中所有记录命令
摘要:SQL删除一个表中所有记录命令 阅读全文

posted @ 2008-05-08 09:22 simhare

ADO.NET中获取sql server中所有数据库的名字
摘要:ADO.NET中获取sql server中所有数据库的名字 阅读全文

posted @ 2008-05-08 09:05 simhare

Windows XP sp2+ Sql Server 2000 Developer
摘要:设置xp自带防火墙,在例外中添加1433端口 阅读全文

posted @ 2008-04-08 10:55 simhare

sql 取出前20到前50条记录
摘要:sql 取出前20到前50条记录等类似情况 阅读全文

posted @ 2007-12-13 08:12 simhare

导航