There might be quite few times, when you have a view. And you want to create a new table out of existing view without spending more than 1 minute. Or may be you want to create a new table structure out of existing table structure.
Following SQL query can be used to achieve this effect-
select * into new_table_name from old_table_name
Note:- this would not only copy the existing table structure but it would also copy the data present inside existing table.
Good Points:
Following SQL query can be used to achieve this effect-
select * into new_table_name from old_table_name
Note:- this would not only copy the existing table structure but it would also copy the data present inside existing table.
Good Points:
- This is the fastest way to create a new table from scratch, but from existing table.
- You can create a new table from existing view.
- In above query you can opt to select particular columns or can give new names to existing columns.
- Sybase
No comments:
Post a Comment