How to select all data from student table starting the name from letter 'r'?
A. SELECT * FROM student WHERE name LIKE 'r%';
B. SELECT * FROM student WHERE name LIKE '%r%';
C. SELECT * FROM student WHERE name LIKE '%r';
D. SELECT * FROM student WHERE name LIKE '_r%';
Answer: Option A
Solution(By Examveda Team)
To select all data from the "student" table where the names start with the letter 'r,' you can use theLIKE
operator in SQL. Here's an explanation of each option:Option A:
SELECT * FROM student WHERE name LIKE 'r%';
This option selects all rows where the "name" column starts with 'r'.
Option B:
SELECT * FROM student WHERE name LIKE '%r%';
This option selects all rows where the "name" column contains the letter 'r' anywhere within the name.
Option C:
SELECT * FROM student WHERE name LIKE '%r';
This option selects all rows where the "name" column ends with the letter 'r'.
Option D:
SELECT * FROM student WHERE name LIKE '_r%';
This option selects all rows where the "name" column has 'r' as the second letter.
Since you want to select names starting with 'r,' the correct query is
Option A
, which uses 'r%'
in the LIKE
clause to match names that start with 'r'. Related Questions on Sql Miscellaneous
A. Structured Query Language
B. Structured Query List
C. Simple Query Language
D. None of these
Which is the subset of SQL commands used to manipulate Oracle Database structures, including tables?
A. Data Definition Language(DDL)
B. Data Manipulation Language(DML)
C. Both of above
D. None
Which operator performs pattern matching?
A. BETWEEN operator
B. LIKE operator
C. EXISTS operator
D. None of these
What operator tests column for the absence of data?
A. EXISTS operator
B. NOT operator
C. IS NULL operator
D. None of these
Join The Discussion