मराठी

Sonal needs to display name of teachers, who have "o" as the third character in their name. She wrote the following query. Select name From teacher Where name ="$$o?"; But the query is not producing

Advertisements
Advertisements

प्रश्न

Sonal needs to display name of teachers, who have "o" as the third character in their name. She wrote the following query.

Select name
From teacher
Where name ="$$o?";

But the query is not producing the result. Identify the problems.

अति संक्षिप्त उत्तर
Advertisements

उत्तर

Problems:

  • = cannot perform pattern matching; use LIKE.
  • SQL wildcards are % and _, not $$ and ?.
  • For o as the third character, use two underscores before o, followed by %.
SELECT name
FROM teacher
WHERE name LIKE '__o%';
shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 10: Structure Query Language - EXERCISE [पृष्ठ १९६]

APPEARS IN

सीबीएसई Computer Science with Python [English] Class 12
पाठ 10 Structure Query Language
EXERCISE | Q 7. | पृष्ठ १९६
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×