I'm buying a domain which already has 12 years, I would like to know if after the transfer for my id this domain will lose rank on google?
or does it have any consequence for google rank ?
It depends what you mean by "Google rank" since there is no such thing by that name.
If you mean "your pages' rankings"
This will affect your pages' performance in Google.
Firstly, keywords in the domain name are one of the heavier weighted ranking factors. So if this new domain has better keywords in it you should see a boost in your overall rankings. If it has less keywords you should expect a drop in your overall rankings.
Secondly, by changing domains you are essentially starting from scratch as all of your URLs with be different. This will decimate your rankings. To avoid this issue you will need to do a 301 redirect from the old URLs to the new URLs. You will lose a small amount of PageRank but otherwise all of your link "juice" and rankings will be "transferred" over to the new domain. This process does take a few weeks to occur so when you make the change don't freak out when your rankings temporarily fluctuate and drop.
If you mean "the PageRank of your pages"
This will affect PR of your pages. PageRank is per page not per website. If you do not do the 301 redirect I mentioned above you will lose whatever PageRank your pages currently have. If you do the 301 redirect you will retain most of it when Google refactors the PageRank for your pages after the 301 redirects kick in.
FYI, Google does keep track of who owns a domain. If you have a history of owning domains that have a lot of low quality content or being penalized for manipulating the search engines buying a new domain name will not help you as Google will associate the new domain with you as well.
Yes it will temporarly hurt your rankings. But good news, you can reduce the damage done.
I would start by setting both sites up on Google Webmasters and going through the
Also set up
All this an more is explained in detail in Moving your site on Webmaster Tools Help.