This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

sybase  RSS feed

 
MInu
Ranch Hand
Posts: 517
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to create a temp copy of a table in sybase ie. like,
create table t2 like t1
[ August 30, 2004: Message edited by: Bear Bibeault ]
 
Julian Kennedy
Ranch Hand
Posts: 823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you say "temp table" do you mean a temporary, i.e. # table, or a temporary copy of a permanent table?

The simplest way to do either is with SELECT INTO. Note that SELECT INTO is not really suitable for production use due to issues with locking and logging (lack thereof).

You have to be SA or DBO to do the above. Note that it won't copy constraints, indexes, etc. If you only want a temporary table (lasts as long as your session) do the following:

Jules
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!