Find all the students who either are male or live in Mumbai ( have Mumbai as a part of their address).
Question
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
It will take less than 1 minute to register for lifetime. Bonus Tip - We don't send OTP to your email id Make Sure to use your own email id for free books and giveaways
Answers ( 22 )
select student_name from students where (sex = ‘M’) OR (student_address like ‘%mumbai%’)
Shouldn’t it be like lower(student_address) like ‘%mumbai%’
Select * from students where gender = ‘Male’ or address like ‘%Mumbai%’
Check the corner cases of case-sensitivity
Sorry it a private answer.
Check the corner cases of case-sensitivity
Select name
From students
Where lower(gender) in (‘male’,’m’)
Or lower(address) = ‘%mumbai%’
SELECT STUDENT_NAME FROM STUDENT WHERE LOWER(GENDER) IN (‘MALE’ , ‘M’) OR LOWER(ADDRESS) = %MUMBAI%
SELECT student_name
FROM student WHERE LOWER(Gender) IN (“MALE”, “M”)
OR LOWER(ADDRESS) = “%MUMBAI%”
Recheck , LOWER(ADDRESS) LIKE ‘%mumbai%.
Select student_name from Students
where lower(gender) in (‘male’, ‘m’) or lower(address) like ‘%mumbai%’;
SELECT name FROM students
WHERE lower(gender) in (‘male’, ’m’)
OR lower(address) LIKE ‘%mumbai%’
SELECT NAME FROM STUDENT WHERE LOWER(GENDER) IN (‘male’ , ‘m’) OR LOWER(ADDRESS) like %mumbai%
select student_name from student where lower(student_gender) in (‘male’,’m’) or lower(student_address) like ‘%mumbai%’;
SELECT student_name
FROM students
WHERE gender = ‘M’ OR address ILIKE ‘%mumbai%’
SELECT* FROM students
WHERE Gender = ‘Male’ or UPPER(address) like ‘%MUMBAI%’
SELECT * FROM students
WHERE gender = ‘Male’ or lower(address) LIKE ‘%mumbai%’
SELECT student_name
FROM student_data
WHERE TRIM(LOWER(gender))=’male’
OR TRIM(LOWER(address))=’%mumbai%’
select stu_name from stu
where gender=’m’ or
address ilike ‘%Mumbai%’
SELECT STUDENT_NAME
FROM STUDENT_TB
WHERE UPPER(GENDER) IN(‘MALE’,’M’) OR UPPER(CITY) LIKE ‘%MUMBAI%’
SELECT STUDENT_NAME
FROM STUDENT_TB
WHERE UPPER(GENDER) IN(‘MALE’,’M’) OR UPPER(ADDRESS) LIKE ‘%MUMBAI%’
SELECT * FROM STUDENTS
WHERE GENDER = ‘M’ OR LOWER(ADDRESS) LIKE %mumbai%