SQL快速用启动
开启各种服务
@NET stop SQLSERVERAGENT
@NET stop MSSQLServerOLAPService
@NET stop msftesql
@NET stop MsDtsServer
@NET stop SQLWriter
@NET stop MSSQLSERVER
@echo off
@echo.停止完毕!
@pause
开启服务并且开启数据库
@NET start MSSQLSERVER
sqlwb
@echo off
@echo
相关文档:
Truncate Logs for SQL Server 2008
I had previously posted how to Truncate Logs for SQL Server 2005. Unfortunately, this method does not work in SQL Server 2008. The reason is because the “WITH TRUNCATE_ONLY” command is no longer in SQL 2008. Assuming you run in full recovery mode, the n ......
1. select top pageSize
* from table where id not in(select top((pageNo-1)*pageSize
) id from table order by id asc)
2. select * from table where id<=pageSize*pageNo
and id>(pageNo-1)*pageSize
order by id asc
注:
pagesize每页显示的记录数
pageNo当前第几页
......
SQL函数 left()、charindex()的使用
1、left()
LEFT (<character_expression>, <integer_expression>)
返回character_expression 左起 integer_expression 个字符。
2.charindex()
返回字符串中某个指定的子串出现的开始位置。
CHARINDEX (<’substring_expression’>, <expressio ......
我们知道用powerdesigner导出的sql文件后缀为'.sql';用phpmyadmin很容易导入MysQL数据库,但是用PHP怎么导入数据库呢?
我用powerdesigner设计一个数据库后导出sql文件(一个投票系统)为'vote.sql';
文件内容为(一些sql语句和注释):
/*======================= ......
在网上找了很多,总是不知道怎么用,于是自己写了一个:
declare @strHex char(5),
@len int,
@intOut int,
@i int,
@charint int
set @strHex = '20'
set @len = len(rtrim(@strHex))
set @i = 1
set @intOut = 0
while @i <= @len
begin
set @charint = case substring(upper(rtrim(ltrim(@strHex))) ......