CREATE TABLE `schedule` (
`id` smallint(6) NOT NULL AUTO_INCREMENT,
`aircraftType` varchar(50) DEFAULT NULL,
//...other fields
PRIMARY KEY (`id`),
) ENGINE=MyISAM AUTO_INCREMENT=5611 DEFAULT CHARSET=latin1;
CREATE TABLE `aircrafts` (
`id` smallint(6) NOT NULL AUTO_INCREMENT,
`aircraftType` varchar(50) DEFAULT NULL,
//...other fields
PRIMARY KEY (`id`),
) ENGINE=MyISAM AUTO_INCREMENT=5611 DEFAULT CHARSET=latin1;
表 「附表」
aircraftType = "320"
表 「飛機」
aircraftType = "A320"
aircraftType = "A330"
查詢:
SELECT *
FROM Schedule F, Aircrafts A
WHERE F.aircraftType = A.aircraftType;
如何以這種方式更新此查詢,以便在WHERE子句中將aircratf類型「320」和「A320」視爲相似?
Shoudnt你更新相同的數據列? – Mihai
@Mihai不,我只需要選擇相同的數據,無需進一步更新。 –