RE: [SQL] Delete coloumn

2001-08-07 Thread Grigoriy G. Vovk
Aug 6, 23:35 -0500, Robby Slaughter wrote: > SELECT INTO it. Example: > > CREATE TABLE sample ( > id INTEGER, > data TEXT, > badcolumn DATE ); > > Now to delete the bad column table: > > CREATE TABLE sample_copy ( > id INTEGER, > data TEXT); > > and then copy it all over: > > SELECT

Re: [SQL] Delete coloumn

2001-08-06 Thread Grant
My response was incorrect! That's what you get for using phppgadmin all day everyday. A transparent feeling that there is alter table drop column support in postgresql :) Sorry. > > Please send to me how to delete coloumn in SQL. > > Thank's > > http://www.ca.postgresql.org/users-lounge/docs/7.1

RE: [SQL] Delete coloumn

2001-08-06 Thread Robby Slaughter
Unfortunately, there's no easy way to delete a column in a table in PostgreSQL. The standard SQL syntax is: ALTER TABLE tablename DROP COLUMN columnname; But I repeat, this is NOT supported in postgresql. If you really need to delete a column you can always just create a new table with an id

Re: [SQL] Delete coloumn

2001-08-06 Thread Grant
> Please send to me how to delete coloumn in SQL. > Thank's http://www.ca.postgresql.org/users-lounge/docs/7.1/reference/ Bookmark the above URL. ALTER TABLE is what you are looking for: http://www.ca.postgresql.org/users-lounge/docs/7.1/reference/sql-altertable.html