| Author |
Topic |
|
Bellus
Starting Member
29 Posts |
Posted - 2007-10-31 : 08:08:32
|
| HeyI 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 |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-10-31 : 08:13:33
|
quote: Originally posted by Bellus HeyI 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_typeMadhivananFailing to plan is Planning to fail |
 |
|
|
elancaster
A very urgent SQL Yakette
1208 Posts |
|
|
Bellus
Starting Member
29 Posts |
Posted - 2007-10-31 : 08:26:58
|
| "alter table table1 alter column column1 text"doesnt work.... |
 |
|
|
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 alreadyEm |
 |
|
|
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? |
 |
|
|
elancaster
A very urgent SQL Yakette
1208 Posts |
|
|
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 AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
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 googleEm |
 |
|
|
arorarahul.0688
Posting Yak Master
125 Posts |
Posted - 2007-10-31 : 09:15:31
|
| THIS THE PROPER FORMAT TO ALTER THE DATATYPE OF A COLUMNALTER TABLE <TABLE NAME> ALTER COLUMN <COLUMN_NAME> NEW DATATYPERahul Arora MCA 07 BatchNCCE Israna, PanipatHRY, INDIA |
 |
|
|
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 COLUMNALTER TABLE <TABLE NAME> ALTER COLUMN <COLUMN_NAME> NEW DATATYPERahul Arora MCA 07 BatchNCCE Israna, PanipatHRY, INDIA
Only in SQL Server The OP is asking for Postgresql syntax MadhivananFailing to plan is Planning to fail |
 |
|
|
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 COLUMNALTER TABLE <TABLE NAME> ALTER COLUMN <COLUMN_NAME> NEW DATATYPERahul Arora MCA 07 BatchNCCE Israna, PanipatHRY, 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. |
 |
|
|
|