Following is the important script for database server as the table "tbl_Log" as already created.
- For Adding Default Value in Table
- ALTER TABLE YourTable ADD CONSTRAINT DF_SomeName DEFAULT N'1' FOR YourColumn;
- For Increasing the Column Size
- ALTER TABLE YourTable ALTER COLUMN YourColumn VARCHAR (50) NOT NULL;
- For Add/Creating New Column
- ALTER TABLE PRESENTED_VOUCHER add descrip nvarchar(200);
- For Change/Modify Existing Column
- ALTER TABLE PRESENTED_VOUCHER alter column descrip nvarchar(200);
ALTER TABLE Projects add
ReplyDeleteBalance_Acc varchar(10),
Balance_Acc1 varchar(10),
Balance_Cus varchar(10),
Balance_Cus1 varchar(10),
Balance_Cost varchar(10),
Balance_Pur varchar(10),
Balance_PurDisc varchar(10),
Balance_Exp varchar(10);
ALTER TABLE Projects ALTER COLUMN [NAME] nvarchar (200);
ReplyDeleteALTER TABLE Projects ALTER COLUMN LongDescription nvarchar (1000);
ALTER TABLE SUB_INV add wgt1 float null;
ReplyDeleteALTER TABLE SUB_INV add wgt2 float null;
for Sikendar Sb - Hawks
alter login sa with password = 'sa*786'
ReplyDeleteALTER TABLE customer ALTER COLUMN cus_date smalldatetime NULL;
ReplyDeleteaLTER TABLE customer add close_date smalldatetime Null;
ReplyDeleteaLTER TABLE customer add Cus_Survay_Code nvarchar(6) Null;
ReplyDeleteaLTER TABLE invoice add cash_received float default 0;
ReplyDeleteALTER TABLE tbl_TraDocImg_Dtl ALTER COLUMN Code nvarchar(5) NULL;
ReplyDelete