Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
tahseenm
Yak Posting Veteran
64 Posts |
Posted - 2006-01-20 : 10:30:06
|
| I created a table in sql server and connected through ODBC to Access. Everything is working out fine. I want to create the same original table in sql server as a test table instead testing on the original one. Can any body tell me how to create a duplicate table in sql server and rename it as test. Thanks and appreciate your response.moetahsen |
|
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
Posted - 2006-01-20 : 10:38:41
|
| script the object out using generate sql script and just change the name. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-01-23 : 02:30:36
|
| If you dont worry about the indices thenselect * into newtable from oldtableMadhivananFailing to plan is Planning to fail |
 |
|
|
tahseenm
Yak Posting Veteran
64 Posts |
Posted - 2006-01-23 : 08:27:09
|
| Thanks and appreciated. I will try to do that. Thanks!moetahsen |
 |
|
|
tahseenm
Yak Posting Veteran
64 Posts |
Posted - 2006-01-23 : 15:41:00
|
| I try to create a duplicate table by using this scriptselect * into newtable from oldtable but its coming out as an error. Can anybody tellse me the correct script to create a duplicate table and rename it. Thanks and appreciate quick response.moetahsen |
 |
|
|
cshah1
Constraint Violating Yak Guru
347 Posts |
Posted - 2006-01-23 : 15:50:14
|
| What error are you receiving?SELECT * INTO NewTableName FROM OldTable should workor Generate SQL Script for the oldtable (in EM right click on the table-->All Task-->Generate SQL Script)change the name in the script and create a new tableand use INSERT INTO NewTable(col1,col2 ..) FROM OldTable |
 |
|
|
tahseenm
Yak Posting Veteran
64 Posts |
Posted - 2006-01-23 : 16:06:22
|
| Thanks!moetahsen |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-01-24 : 00:29:23
|
| >>select * into newtable from oldtable but its coming out as an error.What is the error you got?MadhivananFailing to plan is Planning to fail |
 |
|
|
tahseenm
Yak Posting Veteran
64 Posts |
Posted - 2006-02-01 : 11:27:47
|
| Hello Everyone,I would like to get some information that I created a table in SQL Server and I would like to setup some securities such as only me have to have full access and rest of it could have access to the table and input data etc. but not the design of the table etc. Please let me know how to set up this in an easy way. Thanks and you guys are great help always. Thanks!moetahsen |
 |
|
|
|
|
|