Click Right Mouse on Database you want to migrate then -> Tasks -> Generate Scripts...
Wizard will open click Next then chose objects you want to migrate and click Next again, then click Advanced scroll a bit down and in Types of data to script choose Schema and data (unless you want ...