SQLServer日期格式代码
转换方法: convert(nvarchar(8),starttime,14)
100 (1, 2)
默认设置
mon dd yyyy hh:miAM(或 PM)
101
美国
mm/dd/yyyy
102
ANSI
yy.mm.dd
103
英国/法国
dd/mm/yy
104
德国
dd.mm.yy
105
意大利
dd-mm-yy
106 (1)
-
dd mon yy
107 (1)
-
mon dd, yy
108
-
hh:mi:ss
9 或 109 (1, 2)
默认设置 + 毫秒
mon dd yyyy hh:mi:ss:mmmAM(或 PM)
110
美国
mm-dd-yy
111
日本
yy/mm/dd
112
ISO &nbs
相关文档:
CREATE function fGetPy(@str varchar(500)='')
returns varchar(500)
as
begin
declare @strlen int,@return varchar(500),@ii int
declare @c nchar(1),@chn nchar(1)
select @strlen=len(@str),@retur ......
查询northwind数据库中orders中的10到20条记录
select top 10 * from orders
where orderid > ( select max(orderid) from (select top 10 orderid from orders order by orderid) as t&nbs ......
1、创建数据库testdb
2、创建表test
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[test](
[id] [nchar](10) COLLATE Chinese_PRC_CI_AS NULL,
[name] [nchar](10) COLLATE Chinese_PRC_CI_AS NULL,
[sex] [bit] NULL
) ON [PRIMARY]
3、创建数据库db
......
create database db
use db
go
create table course
(
sno varchar(20),
cno int ,
Gmark int
)
insert into course values('20071513115',1,80)
insert into course values('20071513114',2,80)
insert into course values('20071513113',3,80)
insert into course values('20071513 ......
SQL Server 2000
Installing SQL Server 2000 (E文)
http://msdn.microsoft.com/en-us/library/aa299042(SQL.80).aspx
SQL Server 2000补丁
Microsoft SQL Server 2000 Service Pack 3a
http://www.microsoft.com/downloads/details.aspx?displaylang=zh-cn&FamilyID=90DCD52C-0488-4E46-AFBF-ACACE536 ......