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.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 save one table in two diffrent name

Author  Topic 

amirs
Constraint Violating Yak Guru

260 Posts

Posted - 2010-11-23 : 01:33:00
Dear Member
please tell me it is possible to save a one table in two different name in sql2005 database

i have use insert, delete , update command both name


russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2010-11-23 : 10:08:59
SELECT * INTO newTableName FROM oldTableName;
Go to Top of Page

jcelko
Esteemed SQL Purist

547 Posts

Posted - 2010-11-23 : 11:09:54
Yes, you can have the same data in two tables. This is called redundancy and we do not want it. The goal of databases -- relational and others -- is to have one fact, one place, one way, one time.

A man with two wristwatches is never sure what time it is :)

--CELKO--
Books in Celko Series for Morgan-Kaufmann Publishing
Analytics and OLAP in SQL
Data and Databases: Concepts in Practice
Data, Measurements and Standards in SQL
SQL for Smarties
SQL Programming Style
SQL Puzzles and Answers
Thinking in Sets
Trees and Hierarchies in SQL
Go to Top of Page

jeffw8713
Aged Yak Warrior

819 Posts

Posted - 2010-11-23 : 11:23:16
What is the purpose for saving the data in two tables? Are you creating an audit table - or something else?

If all you need is a different name to access the table, lookup SYNONYMS in books online. You can create any number of synonyms on an object.

Jeff
Go to Top of Page
   

- Advertisement -