博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

Create table 完整版

Posted on 2007-03-27 14:08  Snapping  阅读(241)  评论(0编辑  收藏  举报

USE SnappingTest
GO

CREATE TABLE DBO.FreeGift
(
 FreeGiftID int identity(1,1) not null,
 FreeGiftType char(1) not null default('')
)

alter table dbo.FreeGift add constraint PK_FreeGift primary key (FreeGiftID)
go


select * from snappingtest.dbo.FreeGift(nolock)

create index IX_FreeGift_FreeGiftType on dbo.freegift(FreeGiftType)