命令没有以多个子查询正确结束
command not properly ended with multiple subqueries
SELECT s_fname
FROM (SELECT s_fname from student) as s_n
WHERE s_n like 'Youss%';
我在多个子查询中遇到此错误,但无法正确处理。
ORA-00933: SQL 命令未正确结束
像这样:
SELECT s_fname
FROM (SELECT s_fname from student) s_n
WHERE s_fname like 'Youss%';
或者这样试试:
with (select s_fname from student) as s_n
select s_fname from s_n
where s_fname like 'Youss%';
也就是说,除了作为练习之外,没有实际理由在这里使用子查询。最好只说这个:
select s_fname
from student
where s_fname like 'Youss%';
SELECT s_fname
FROM (SELECT s_fname from student) as s_n
WHERE s_n.s_fname like 'Youss%';
您在 table 而不是字段
上使用 WHERE 子句
您也可以在您的特定情况下改为这样写:
SELECT s_n.s_fname
FROM student as s_n
WHERE s_n.s_fname like 'Youss%';
SELECT s_fname
FROM (SELECT s_fname from student) as s_n
WHERE s_n like 'Youss%';
我在多个子查询中遇到此错误,但无法正确处理。 ORA-00933: SQL 命令未正确结束
像这样:
SELECT s_fname
FROM (SELECT s_fname from student) s_n
WHERE s_fname like 'Youss%';
或者这样试试:
with (select s_fname from student) as s_n
select s_fname from s_n
where s_fname like 'Youss%';
也就是说,除了作为练习之外,没有实际理由在这里使用子查询。最好只说这个:
select s_fname
from student
where s_fname like 'Youss%';
SELECT s_fname
FROM (SELECT s_fname from student) as s_n
WHERE s_n.s_fname like 'Youss%';
您在 table 而不是字段
上使用 WHERE 子句您也可以在您的特定情况下改为这样写:
SELECT s_n.s_fname
FROM student as s_n
WHERE s_n.s_fname like 'Youss%';