我有三张桌子
CREATE TABLE guest(
name varchar(100),
ranking int,
PRIMARY KEY (name)
);
CREATE TABLE room(
roomname varchar(100),
wallcolor varchar(100),
rating int,
PRIMARY KEY(roomnane)
);
CREATE TABLE reservation(
name varchar(100),
roomname varchar(100),
day varchar(100),
moveinday int,
moveoutday int,
PRIMARY KEY(roomname, day, start, finish),
FOREIGN KEY(roomname) REFERENCES room(roomname),
FOREIGN KEY(name) REFERENCES guest(name)
);
我正在尝试将所有“湖泊”房间改为“海湾”房间和“海湾”房间改为“湖”房间,而没有明确更改所涉及的房间。我怎么能这样做?我尝试使用更新查询,但我不知道如何实现这一目标。