Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

command not properly ended with multiple subqueries

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

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Like this:

SELECT s_fname
FROM (SELECT s_fname from student) as 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%';
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading