Re: CREATE TABLE LIKE, error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Gary Every" <Gary.Every@xxxxxxxxxxxxxxxxxxxxxxx>


> Try:
> CREATE table new_table SELECT * from old_table limit 1;
> 
> delete from new_table;
> 
> This will give you the same structure in both tables, and the 
> deletion will make the new_table empty.

Not quite the same as it will not copy indexes/keys...

---John Holmes...

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux