| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 918 人关注过本帖
标题:关于排序规则和[datetime]数据类型
只看楼主 加入收藏
冬日暖阳
Rank: 1
等 级:新手上路
帖 子:50
专家分:0
注 册:2007-7-2
收藏
 问题点数:0 回复次数:0 
关于排序规则和[datetime]数据类型

use [db_student]
go
if exists (select *from dbo.sysobjects where id = object_id('[dbo].[t_student]')and objectproperty(id,'isusertable') = 1)
drop table [dbo].[student]
go
create table [dbo].[student]
([s_studentno][char](8)collate chinese_prc_ci_as not null,
[s_name][char](20)collate chinese_prc_ci_as not null,
[s_sex][char](2)collate chinese_prc_ci_as not null,
[s_department][char](20)collate chinese_prc_ci_as not null,
[s_class][char](10)collate chinese_ prc_ci_as not null,
[s_birthday][datetime](8)
[s_entrance][char](6)collate chinese_prc_ci_as not null)
on [primary]

alter table [dbo].[student]with nocheck add
constraint [pk_student]primary key clustered
([s_studentno])
on [primary]
go

服务器: 消息 448,级别 16,状态 2,行 6
排序规则 'chinese_' 无效。

后来我进行了一些更改:把排序规则去掉了,还有[datetime]后不可以限制字段宽度.这是为什么呀.下面这个语句就可以执行.可我有点不明白
create table [dbo].[student]
([s_studentno][char](8)not null,
[s_name][char](20)not null,
[s_sex][char](2)not null,
[s_department][char](20)not null,
[s_class][char](10)not null,
[s_birthday][datetime]
[s_entrance][char](6)not null)
on [primary]

alter table [dbo].[student]with nocheck add
constraint [pk_student]primary key clustered
([s_studentno])
on [primary]
go

搜索更多相关主题的帖子: datetime 规则 类型 数据 chinese 
2007-07-04 10:29
快速回复:关于排序规则和[datetime]数据类型
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.013867 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved