question

DEEPANSHU_KUNAL avatar image
DEEPANSHU_KUNAL asked

SQL ORACLE


Consider the given STUDENTS table:

1636466106917.png


Write SQL query to fetch details of students whose Surname is of 5 characters i.e S_NAME has 5 characters after space(' ').

I tried like clause(5 underscores after space)

1636466351228.png

but it is resulting in complete table

I also tried length function

SQL>select * from STUDENTS

where length(S_NAME)=11;

but it is shows no data found.

oracle-sql-developer
1636466106917.png (126.6 KiB)
1636466351228.png (2.6 KiB)
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.