--这样。if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tabbuyprice]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tabbuyprice]
GO CREATE TABLE [dbo].[tabbuyprice] (
[id] [int] IDENTITY (1, 1) NOT NULL primary key , --设置关键主键
[ordercode] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
[pro_id] [int] NULL ,
[small_type] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
[prices] [numeric](18, 2) NULL ,
[Times] [datetime] not NULL default(getdate()), --默认系统时间
) ON [PRIMARY]
GO
drop table [dbo].[tabbuyprice]
GO CREATE TABLE [dbo].[tabbuyprice] (
[id] [int] IDENTITY (1, 1) NOT NULL primary key , --设置关键主键
[ordercode] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
[pro_id] [int] NULL ,
[small_type] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
[prices] [numeric](18, 2) NULL ,
[Times] [datetime] not NULL default(getdate()), --默认系统时间
) ON [PRIMARY]
GO
楼主用TEXTIMAGE_ON想实现什么效果?
CREATE TABLE [dbo].[tabbuyprice] (
[id] [int] IDENTITY (1, 1) NOT NULL primary key, -- 设置关键主键
[ordercode] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
[pro_id] [int] NULL ,
[small_type] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
[prices] [numeric](18, 2) NULL ,
[Times] [datetime] not NULL default(getdate()), --默认系统时间
)
drop table [dbo].[tabbuyprice]
GO CREATE TABLE [dbo].[tabbuyprice] (
[id] [int] IDENTITY (1, 1) NOT NULL primary key , --设置关键主键
[ordercode] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
[pro_id] [int] NULL ,
[small_type] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
[prices] [numeric](18, 2) NULL ,
[Times] [datetime] not NULL default(getdate()), --默认系统时间
) ON [PRIMARY] --把后面那块去掉即可******************************
GO