• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MySQL query explanation

 
Kishor Joshi
Ranch Hand
Posts: 674
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I want some clarification in My Query

I have run following query

SELECT first_name,last_name FROM employeedata WHERE (first_name="Shikha" OR last_name="Vats") OR age>=10;



and it returns columns set that are true.

My Question is I have not selected age column in my query but it is still shows result that match with age condition.why?


I am using MySQL RDBMS

Thanks
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The subset of attributes that is returned from a query is independent of the subset of attributes used to select which rows are returned.
 
Kishor Joshi
Ranch Hand
Posts: 674
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks ulf
got it
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic