× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I will try that, I got that syntax from the DB2 LUW manual. Wish those two DB2 teams would merge together and collaborate.

I made a long drawn out script to copy data to a different table, create new table, restore table permissions, restore constraints, insert new data by overriding identity column so I get a like for like insert (identity columns need to stay the same), drop backup table

-----Original Message-----
From: Vernon Hamberg [mailto:vhamberg@xxxxxxxxxxxxxxx]
Sent: Thursday, March 3, 2016 5:30 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Subject: Re: Rename column in SQL?

Matt = you must be using the wrong syntax for changing the system name - this statement makes no sense to me. Checking the manual I get the following.

Just use the ALTER COLUMN syntax that is already there -

ALTER TABLE APPLICATIONS ALTER COLUMN PASSWORDHISTORYENABLED FOR PASSHISTEN [put in data-type stuff here] ;

Simple!

HTH
Vern

On 3/3/2016 3:07 PM, Matt Olson wrote:
I'm trying to rename a column, simple task I know. But for some reason the following syntax is not working:

ALTER TABLE APPLICATIONS RENAME COLUMN PASSWORDHISTORYENABLED TO
PASSWORDHISTORYENABLED FOR PASSHISTEN;

I wish to rename the column (long name is PASSWORDHISTORYENABLED and is staying the same), just trying to fix the "System Name" which is unique to IBM I's flavor of DB2 and set it to PASSHISTEN (10 character limit).

Thoughts?


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.