Click here to Skip to main content
15,918,808 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i faced this que in an interview
Posted
Comments
Kornfeld Eliyahu Peter 9-Feb-14 4:25am    
And your answer was?

1 solution

In standard SQL there is no way to use a table without creating it. There is a shortcut to create table based on a select statement.
SQL
CREATE TABLE new_tbl SELECT * FROM old_tbl
However this also based on the CREATE TABLE command...

There is also an extension to do it without CREATE TABLE (originally from SyBase)
SQL
INSERT INTO new_tbl SELECT * FROM old_tbl
This is fit into the category in the question, and fortunately it's supported by Oracle's PL/SQL!!!

So the answer is yes...
 
Share this answer
 
Comments
Member 10582228 10-Feb-14 12:13pm    
Thanks bro for ur answer...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900