Advertisements
Advertisements
Question
Ms. Mohini is working in a school and stores the details of all students in a table SCHOOLDATA.
TABLE: SCHOOLDATA | ||||||
Admno | Name | Class | House | Percent | Gender | Dob |
20150001 | Aditya Das | 10 | Green | 86 | Male | 2006-02-20 |
20140212 | Harsh Sharma | 11 | Red | 75 | Male | 2004-10-05 |
20090234 | Swapnil Pant | 10 | Yellow | 84 | Female | 2005-11-21 |
20130216 | Soumen Rao | 9 | Red | 91 | Male | 2006-04-10 |
20190227 | Rahil Arora | 10 | Blue | 70 | Male | 2005-05-14 |
20120200 | Akasha Singh | 11 | Red | 64 | Female | 2004-12-16 |
Write SQL statements from the above given table to:
- To remove leading spaces from the column Name.
- Display the names of students who were born on Sunday.
Code Writing
Solution
SELECT LTRIM (Name) FROM SCHOOLDATA;
SELECT Name FROM SCHOOLDATA WHERE DAYNAME(Dob)="SUNDAY";
shaalaa.com
Is there an error in this question or solution?