473,396 Members | 1,966 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How can I move a table from a schema to another one?

Is it possible? Thanks!

Carmelo
Nov 12 '05 #1
3 11579
1.Use db2look to extract table DDL and then use export and load
command to migrate the table data into the new schema

2. Else just create a Alias in new schema which will poin the
original table .

Nov 12 '05 #2
1.Use db2look to extract table DDL and then use export and load
command to migrate the table data into the new schema

2. Else just create a Alias in new schema which will poin the
original table .

Nov 12 '05 #3
I think I'd do it like that:

Create new table in new schema:
db2 create table <sch2>.<tab> like <sch1>.<tab>

Copy data:
db2 insert into <sch2>.<tab> select * from <sch1>.<tab>

Drop old table:
db2 drop <sch1>.<tab>

Recreate Constraints, Indexes, etc, from original table:
I would do that via a db2look output

Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Sgt. Sausage | last post by:
Quick question: Does SQL do table/schema changes "in place"? I've got a large table (140+ million rows of very wide data) that we want to change the schema on -- basically to remove a number...
1
by: gaozj111 | last post by:
Hello: Now i want to rename the table schema for example: there is one table ,whose name is A.TEST,the A is the schema name, now i want to rename the A TO B. I want to get the B.TEST table.
2
by: JC Voon | last post by:
Hi: What is the best way to copy the schema of one DataTable to another ?, The DataTable.Clone will create a new DataTable Currently i do it manually destTable.Clear()...
9
by: Joshua.Buss | last post by:
I am trying to move a record from one linked table to another within access, but I'm a complete beginner to VBA and don't know exactly where to begin. I have an access file that has the two...
3
by: Eric | last post by:
When i run my query it transfer last 4 digits of account number from one table to another and its wrong. There are two tables one i use for parsing. Second thru query i use to move data from temp...
8
by: daD | last post by:
I'm trying to write a small database that tracks people coming and going from a small campground. I need to have the current guests in the "current" table" and then have the ability to check them...
22
by: klenwell | last post by:
I'm in the process of refactoring the php code base I've amassed over the last few years into an object-oriented framework. I'm about to start in on the authentication/login extension and I've...
2
by: pavani1 | last post by:
Hi, I have to move my data from one table to another table in database when some condition is true. plz tell that how to start logic.
2
by: Frank Swarbrick | last post by:
Maybe a simple question, but what is the best way to move (not copy!) data from one table to another? Meaning, I want to insert a set of rows from one table to another *and* delete all of the same...
5
by: trixb | last post by:
Hello all, Here is what I need to do and need help with: I have a table that is feeding a chart in a report in Access. If this table has more than 50 records, the graph gets messy, and this is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.