| От | Marshall Spight |
|---|---|
| Тема | Re: Conditional Statement |
| Дата | |
| Msg-id | a64cep$24ht$1@jupiter.hub.org обсуждение исходный текст |
| Ответ на | Conditional Statement (Samik Raychauhduri <samik@cae.wisc.edu>) |
| Список | pgsql-general |
"Samik Raychauhduri" <samik@cae.wisc.edu> wrote in message news:3C82CA4C.6030205@cae.wisc.edu... > I am trying to write a piece of SQL code, which will first check if a > table exist, drop it and then recreate it. I didn't see any 'IF' syntax > in pgsql. Is there any other alternative? I tried to use 'case' > structure, but didn't succeed. The way you do that is to say: drop table foo create table foo ... That's all you need. Nothing fancy. The 'drop table' will print a message if the table didn't exist already, but it doesn't matter. Marshall
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера