Thread: Change of data type
Hello everybody, excuse me how can I change de data type of a field, I currently have: material character(30) but I now want the field in text type like this: material text somebody knows if ALTER TABLE has some option to do this?, or How can I do that?
On pg8, to change tab.col to type t: alter table tab alter column col type t so: alter table tab alter column material type text -j Judith wrote: > Hello everybody, excuse me how can I change de data type of a > field, I currently have: > material character(30) > but I now want the field in text type like this: > > material text > > somebody knows if ALTER TABLE has some option to do this?, or How > can I do that? > > > ---------------------------(end of broadcast)--------------------------- > TIP 1: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly >
# jaltamirano@correolux.com.mx / 2006-08-07 12:38:20 -0500: > Hello everybody, excuse me how can I change de data type of a field, > I currently have: > > material character(30) > > but I now want the field in text type like this: > > material text > > somebody knows if ALTER TABLE has some option to do this?, or How > can I do that? http://www.postgresql.org/docs/8.1/static/sql-altertable.html -- How many Vietnam vets does it take to screw in a light bulb? You don't know, man. You don't KNOW. Cause you weren't THERE. http://bash.org/?255991
Use Alter table notebook from control center
right click on the table and open alter table notebook
you can drop a column or add a column or change the datatype
Kumar
On 8/7/06, Judith <jaltamirano@correolux.com.mx> wrote:
Hello everybody, excuse me how can I change de data type of a field,
I currently have:
material character(30)
but I now want the field in text type like this:
material text
somebody knows if ALTER TABLE has some option to do this?, or How
can I do that?
---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly
--
Kumar
DB2 DBA & SAP Basis professional
You can do the following:
ALTER TABLE table-name ALTER colum-name TYPE text;
Thanks,
--
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)
ALTER TABLE table-name ALTER colum-name TYPE text;
Thanks,
--
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)
On 8/8/06, Kumar Dev <kumardb2@gmail.com> wrote:
Use Alter table notebook from control centerright click on the table and open alter table notebookyou can drop a column or add a column or change the datatypeKumar
On 8/7/06, Judith <jaltamirano@correolux.com.mx > wrote:Hello everybody, excuse me how can I change de data type of a field,
I currently have:
material character(30)
but I now want the field in text type like this:
material text
somebody knows if ALTER TABLE has some option to do this?, or How
can I do that?
---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly
--
Kumar
DB2 DBA & SAP Basis professional