Greg,

I apologize if I am missing something or not understanding correctly
but how would I create a temp table similar to other tables if I am
not aware of datatypes and column names. Is there an efficient way
that I can copy one table schema to a temp table?

Thanks

----- Original Message -----
From: Greg Morphis <[EMAIL PROTECTED]>
Date: Mon, 16 Aug 2004 14:59:41 -0500
Subject: Re: SQL Question
To: CF-Talk <[EMAIL PROTECTED]>

just curious, cant you just create one called temp and use it constantly?

On Mon, 16 Aug 2004 14:46:48 -0500, G <[EMAIL PROTECTED]> wrote:
> Another option would be, if you had an auto-generated numeric primary key, determine your range, call a random number generator, verify that the number is a valid primary key, then do a DELETE * WHERE pk != randomKey.
>
> Just thinking out loud.....
>  ----- Original Message -----
>  From: Greg Morphis
>  To: CF-Talk
>  Sent: Monday, August 16, 2004 2:32 PM
>  Subject: Re: SQL Question
>
>  I think you'd probably have to have a temp table and save a record to it
>  and then delete out the entire original table and then insert the
>  single row back into the table from temp.
>
>  On Mon, 16 Aug 2004 15:19:39 -0400, Qasim Rasheed
>  <[EMAIL PROTECTED]> wrote:
>  > Hello
>  >
>  > I want to delete all records from a table except one (a random one).
>  > Is there a way to do it? I am using SQL Server
>  >
>  >
>
>________________________________
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to