if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[zy_yp1_proxysalesdetail]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[zy_yp1_proxysalesdetail]
GO
CREATE TABLE [dbo].[zy_yp1_proxysalesdetail] (
[lsh] [numeric](18, 0) IDENTITY (1, 1) NOT NULL ,
[proxyid] [char] (10) NULL ,
[hisid] [char] (10) NULL ,
[proxyname] [char] (100) NULL ,
[hisname] [char] (100) NULL ,
[czy] [char] (10) NULL ,
[nbbm] [numeric](8, 0) NULL ,
[sl] [numeric](18, 2) NULL ,//数量
[dj] [numeric](18, 2) NULL ,//单价
[jsdjh] [char] (20) NULL ,
[ph] [char] (20) NULL ,
[yxq] [datetime] NULL ,
[sf] [char] (4) NULL ,
[czrq] [datetime] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[zy_yp1_proxysalesdetail] ADD
CONSTRAINT [DF_zy_yp1_proxysalesdetail_czrq] DEFAULT (getdate()) FOR [czrq],
CONSTRAINT [PK_zy_yp1_proxysalesdetail] PRIMARY KEY CLUSTERED
(
[lsh]
) ON [PRIMARY]
GO