I have following query:
Select * from Students
which retrieves: Id, Name, Class, and School.
I want, no matter what the value of Class is, to just get back Class = 10. Is there a way to do this in sql query?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can do
select id, name, '10' as class, Schoolfrom students
to get back a 10 in the class column regardless of what the actual stored class value is.