Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 ALTER COLUMN

Author  Topic 

Bellus
Starting Member

29 Posts

Posted - 2007-10-31 : 08:08:32
Hey

I am using postgres, I see different ways to add/change a data type to a column - whats right?

ALTER TABLE table1 ALTER COLUMN SET....??

:)

elancaster
A very urgent SQL Yakette

1208 Posts

Posted - 2007-10-31 : 08:11:07
you do know this is a sql server forum?

Em
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-10-31 : 08:13:33
quote:
Originally posted by Bellus

Hey

I am using postgres, I see different ways to add/change a data type to a column - whats right?

ALTER TABLE table1 ALTER COLUMN SET....??

:)


ALTER TABLE table1 ALTER COLUMN column_name new_data_type

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

elancaster
A very urgent SQL Yakette

1208 Posts

Posted - 2007-10-31 : 08:14:11
try here....
http://www.postgresqlforums.com/forums/

Em
Go to Top of Page

Bellus
Starting Member

29 Posts

Posted - 2007-10-31 : 08:26:58
"alter table table1 alter column column1 text"

doesnt work....
Go to Top of Page

elancaster
A very urgent SQL Yakette

1208 Posts

Posted - 2007-10-31 : 08:29:52
postgresql is NOT the same thing as sql server. your other posts all relate to postgresql too and other people have tried to point this out to already

Em
Go to Top of Page

Bellus
Starting Member

29 Posts

Posted - 2007-10-31 : 08:35:10
Who is others?? I have met a lot of really nice people her, willing to help - you are the first one that have comment this - so maybe you refer to your self?
Go to Top of Page

elancaster
A very urgent SQL Yakette

1208 Posts

Posted - 2007-10-31 : 08:36:49
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=91113

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=90987

Em
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-10-31 : 08:38:43
quote:
"I have met a lot of really nice people her, willing to help"


And maybe that's the reason you keep posting wrong questions in wrong forums and don't bother to follow others advice.

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

elancaster
A very urgent SQL Yakette

1208 Posts

Posted - 2007-10-31 : 08:43:13
isn't this the postgresql syntax...
ALTER TABLE <tableName> ALTER COLUMN <columnName> type <newDataType>

although i only found on the first link i came to on google

Em
Go to Top of Page

arorarahul.0688
Posting Yak Master

125 Posts

Posted - 2007-10-31 : 09:15:31
THIS THE PROPER FORMAT TO ALTER THE DATATYPE OF A COLUMN
ALTER TABLE <TABLE NAME> ALTER COLUMN <COLUMN_NAME> NEW DATATYPE


Rahul Arora
MCA 07 Batch
NCCE Israna, Panipat
HRY, INDIA
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-10-31 : 09:17:23
quote:
Originally posted by arorarahul.0688

THIS THE PROPER FORMAT TO ALTER THE DATATYPE OF A COLUMN
ALTER TABLE <TABLE NAME> ALTER COLUMN <COLUMN_NAME> NEW DATATYPE


Rahul Arora
MCA 07 Batch
NCCE Israna, Panipat
HRY, INDIA


Only in SQL Server
The OP is asking for Postgresql syntax

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

KenW
Constraint Violating Yak Guru

391 Posts

Posted - 2007-10-31 : 15:41:12
quote:
Originally posted by arorarahul.0688

THIS THE PROPER FORMAT TO ALTER THE DATATYPE OF A COLUMN
ALTER TABLE <TABLE NAME> ALTER COLUMN <COLUMN_NAME> NEW DATATYPE


Rahul Arora
MCA 07 Batch
NCCE Israna, Panipat
HRY, INDIA



Wow! I've read all 8 of your posts, and all 8 have been the wrong answer to the question posted.

Well, at least you're batting 1000, I guess.
Go to Top of Page
   

- Advertisement -