在 SQL Server 2016 Express 中,我最初创建了一个主键使用 int 数据类型的表。现在,深入到项目中,我意识到我需要将此列作为字符串数据类型,但是当我尝试这样做时:
alter table ExpAwbs
drop constraint PK_ExpAwbs;
alter table ExpAwbs
alter column idExpAwbs varchar(12);
alter table ExpAwbs
add constraint PK_ExpAwbs primary key (idExpAwbs);
我明白了
Msg 4902, Level 16, State 1, Line 1
Cannot find the object "ExpAwbs" because it does not exist or you do not have permissions.
是否可以在临时表上做我想做的事情,还是我需要重新制作表?