Here I tried to add an ALTER table to change the column name, but an error occurred.
Alter table [dbo].[Users]
CHANGE
username UserName varchar(50),
password PassWord varchar(50),
state State int,
name Name varchar(50),
license License varchar(50),
lansno LansNo varchar(50) ,
curcuit_no CurcuitNo varchar(50) ,
communism Communism varchar(100) ,
Olduid OldUid int ,
Is_hunter Is_Hunter bit ,
free_text [FreeText] text ,
country Country varchar(50) ,
curcuit Curcuit varchar(50) ,
license_territory LicenseTerritory [varchar](50) ,
forest Forest varchar(50) ,
association Association varchar(50),
hunt_ar Hunt_Ar varchar(50) ,
area Area varchar(50) ,
contract Contract varchar(50) ,
radio_frequency RadioFrequency varchar(50)
)
This error occurred:
Msg 102, level 15, state 1, line 2
Invalid syntax next to "CHANGE".
So, here I am, I tried this to change the table Change old column name new column name data type .. but here I get an error
source
share