0
我使用Oracle SQL Developer爲學校創建數據庫項目。在Oracle中使用「as」賦予FROM子句別名
我們有我們需要從我們的數據庫中檢索到的信息,所以我正在嘗試編寫查詢來執行此操作。對於我的一個查詢,我試圖重命名我的FROM子句,但遇到錯誤。我試圖把別名放在括號,引號中,但是我仍然得到錯誤。
有人可以指出我的錯誤語法嗎?
SELECT AvatarName AS "MegaAvName", SpeciesName AS "MegaAvSpecies", MagicName
AS "MegaAvMagic", Hoard,
AvatarName AS "Father", SpeciesName AS "FatherSpecies", SpeciesCost AS
"FatherSpeciesCost", WisdomName AS "FatherWisdom",
AvatarName AS "Mother", SpeciesName AS "MotherSpecies", SpeciesCost AS
"MotherSpeciesCost", WisdomName AS "MotherWisdom"
FROM MegaAvatar AS MA, Avatar AS A, Species AS MSP, MagicPower AS MP,
SuperAvatar AS FSA, Avatar AS FA, Species AS FSP, Wisdom AS FW,
SuperAvatar AS MSA, Avatar AS MA, Species AS MSP, Wisdom AS MW
WHERE MA.Avatar_ID=A.AvatarID AND Avatar.SpeciesID=MSP.SpeciesName AND
MegaAvatar.MagicPowerID=MP.MagicPowerID AND A.Hoard>='16'
AND MegaAvatar.PrimParentID=FSA.SuperAvID AND FSA.AvatarID=FA.AvatarID AND
FA.SpeciesID=FSP.SpeciesID
AND MegaAvatar.SecParentID=MSA.SuperAvID AND MSA.AvatarID=MA.AvatarID AND
MA.SpeciesID=MSP.SpeciesID;
啊,我明白了。這在Oracle中是不允許的!謝謝Ben。我會標記管理員關閉。 – ACostea
您應該能夠同意潛在的重複ACostea並自行關閉它。請參閱:https://meta.stackexchange.com/q/250981/179419 – Ben
yup,如果您將鼠標放在AS上的粉紅色線條上,則會看到我們期望您調用閃回查詢子句 – thatjeffsmith