Выполните запрос:
Код:
USE [BillCruxRF] GO IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_tbl_user_Cash]') AND type = 'D') BEGIN ALTER TABLE [dbo].[tbl_user] DROP CONSTRAINT [DF_tbl_user_Cash] END GO USE [BillCruxRF] GO IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tbl_user]') AND type in (N'U')) DROP TABLE [dbo].[tbl_user] GO USE [BillCruxRF] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON GO CREATE TABLE [dbo].[tbl_user]( [ID] [int] NULL, [UserID] [varchar](20) NOT NULL, [Cash] [float] NOT NULL ) ON [PRIMARY] GO SET ANSI_PADDING OFF GO ALTER TABLE [dbo].[tbl_user] ADD CONSTRAINT [DF_tbl_user_Cash] DEFAULT ((0)) FOR [Cash] GO