| От | Kevin Coyner |
|---|---|
| Тема | drop table if exists |
| Дата | |
| Msg-id | 20030305190903.GA20607@rustybear.com обсуждение исходный текст |
| Ответы |
Re: drop table if exists
|
| Список | pgsql-novice |
In MySQL, when I create a new table from a .sql file, I usually start with: DROP TABLE IF EXISTS sometable; CREATE TABLE sometable( This doesn't work in Postgres and I haven't been able to find the equivalent in the docs. If I try to drop a table that doesn't exist, I get an error message, so having that modifier "... if exists ..." is nice. Is there an equivalent to "IF EXISTS" in Postgres? Hoping someone can steer me in the right direction. Thanks Kevin -- Kevin Coyner mailto: kevin@rustybear.com GnuPG key: 1024D/8CE11941
В списке pgsql-novice по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера