Copy a table from one database of sqlserver to another database
Right click on table select Script table as then select drop and create to.
a sql file with queries will open. copy all the contents of this file and the make new query file paste it in to te nw query file. Change name of data base from old (the one which you are coping) to new (the one in which you want to copy table) with find replace option. which is written in use[database_Name]. After changing the name press F5 or execute query. and then refresh database from object explore.Now you will se that table is copied to the new database.
a sql file with queries will open. copy all the contents of this file and the make new query file paste it in to te nw query file. Change name of data base from old (the one which you are coping) to new (the one in which you want to copy table) with find replace option. which is written in use[database_Name]. After changing the name press F5 or execute query. and then refresh database from object explore.Now you will se that table is copied to the new database.
Comments
Post a Comment