| От | Ron Peterson |
|---|---|
| Тема | Re: ALTERING A TABLE |
| Дата | |
| Msg-id | 39369AF1.F55C40CC@yellowbank.com обсуждение исходный текст |
| Ответ на | ALTERING A TABLE (Peter Landis <ntwebdeveloper@yahoo.com>) |
| Список | pgsql-general |
Peter Landis wrote: > > Hi- > I'm a newbie at postgresql and ran into a > situation on trying to alter an element in a table. I > have a table called company where a field is called > address. The address field is set to char() 20 and I > want to alter the value to have an address field of > 100. What would be the command to alter the table to > change this field without affecting the data? If > anyone could help I would greatly appreciate it. You can't use ALTER TABLE to change a field's data description. You'll have to make a new table. Then use SELECT INTO to move your data. Then DROP TABLE oldtable. Then ALTER TABLE tablename RENAME TO newname. -Ron-
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера