我正在使用Oracle SQL Developer为学校创建数据库项目。
我们需要从数据库中检索信息,因此我尝试编写查询来执行此操作。对于我的一个查询,我正在尝试重命名我的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;
答案 0 :(得分:0)
在AS
子句中的表名后删除FROM
。
table_name alias_name
将完成这项工作