How to do the same in Oracle DB as we did in DB2 -Create table from another table in DB2 database
In Oracle, it is quite simple to create the duplicate tables with data :-)
Let's see How --
---------------------------------------------------------------------------------------------------------------
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Create table from another table in Oracle database | |
CREATE TABLE new_table | |
AS (SELECT column_1, column2, ... column_n | |
FROM old_table); | |
-- We can create with Multiple tables also | |
CREATE TABLE new_table | |
AS (SELECT column_1, column2, ... column_n | |
FROM old_table_1, old_table_2, ... old_table_n); | |
** when creating a table in this way, the new table will be populated with the records from the existing table
Like the Facebook Page & join Group
https://www.facebook.com/DataStage4you
https://www.facebook.com/groups/DataStage4you
https://twitter.com/datastage4you
https://groups.google.com/d/forum/datastage4you
For WHATSAPP group , drop a msg to 91-88-00-906098
No comments :
Post a Comment