Yes you can transfer a SATA drive from one computer to another. Just make sure it is not the drive that holds the OS because the OS from the old computer will not work in the new computer.
Unfotunately the only operating system on a hard drive that would recognise new hardware from a new computer was xp most of the time.How ever there are exceptions to this sometimes it would work sometimes it doesnt.Also when 7 and 8 were created these os`s werent able to recognise new hardware and the only way to transfer drives was to completely wipe and format them.This is why I hate windows and like linux better.Linux will automaticaly connect online to there network of open source software and install the new drivers for a new computer,at least Suse will.I dont know about Ubunto or other versions.