|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
copy table in mssql
How do I copy a mssql table? I have tablex and want to create a dublicate and call it tablex_b. Is there a sql statement that can do this?
|
|
#2
|
||||
|
||||
|
not sure about the mssql syntax, you should check your documentation to be sure, but it should be something like this:
Code:
create table sometablename like some_other_table_name |
|
#3
|
|||
|
|||
|
Oh really, it is just that simple? and that will create the new table and populate it with the existing records?
|
|
#4
|
||||
|
||||
|
No, it will just create a table with the exact same structure.
To copy the structure and fill it with the same data you might (not sure) can do this Code:
create table sometablename as (select * from some_other_table_name) |
|
#5
|
|||
|
|||
|
SELECT *
INTO newTable FROM oldTable GO
__________________
El éxito consiste en una serie de pequeñas victorias día a día MySQL, MS SQL, MS ACCESS, Oracle Database Manager - http://victorpendleton.net/products/psdviewer.html |
![]() |
| Viewing: Dev Shed Forums > Databases > Database Management > copy table in mssql |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|