SELECT s_fname
FROM (SELECT s_fname from student) as s_n
WHERE s_n like 'Youss%';
i get this error with multiple subqueries and cant get it right. ORA-00933: SQL command not properly ended
SELECT s_fname
FROM (SELECT s_fname from student) as s_n
WHERE s_n like 'Youss%';
i get this error with multiple subqueries and cant get it right. ORA-00933: SQL command not properly ended
Like this:
SELECT s_fname
FROM (SELECT s_fname from student) s_n
WHERE s_fname like 'Youss%';
Or try it this way:
with (select s_fname from student) as s_n
select s_fname from s_n
where s_fname like 'Youss%';
That said, other than as an exercise, there's no practical reason to use a subquery here. Better just to say this:
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%';
You're using a WHERE clause on a table, not a field
Also you could just write this instead in your particular case:
SELECT s_n.s_fname
FROM student as s_n
WHERE s_n.s_fname like 'Youss%';