If i learn all the notes would I be able to?
Check out hearandplay.com. There are many resources and videos available for those learning to play by ear.
In my opinion , you must be able to sight read as well as play by ear. Playing all the notes of a piece from memory is not the right way..