Apr 21, 2003 #1 nkm Programmer Joined May 27, 2001 Messages 45 Location US How can I alter the column size for an existing table and not loose any data in it. thanks
Apr 21, 2003 #2 expostfacto Programmer Joined Sep 10, 2001 Messages 31 Location US read the docs on alter table. http://www.carnageblender.com: Carnage Blender. Over 40 million battles served. Upvote 0 Downvote
read the docs on alter table. http://www.carnageblender.com: Carnage Blender. Over 40 million battles served.
Apr 22, 2003 #3 JeanNiBee Programmer Joined Mar 28, 2003 Messages 126 Location US Hi Assume the following: Code: CREATE TABLE testing123 ( someField varchar(100) ) You can modify the size like so: Code: ALTER TABLE testing123 MODIFY someField varchar(40) This changes the size from varchar(100) to varchar(40) Hope this helps. -=-=-=-=-=-=-=-=- For ease of reading, any posted CODE should be wrapped by [ignore][COLOR] and Code: [/ignore] tags. Ex: Code: SELECT 1 from sysobjects TGML reference: http://www.tipmaster.com/includes/tgmlinfo.cfm?w=450&h=450"] Upvote 0 Downvote
Hi Assume the following: Code: CREATE TABLE testing123 ( someField varchar(100) ) You can modify the size like so: Code: ALTER TABLE testing123 MODIFY someField varchar(40) This changes the size from varchar(100) to varchar(40) Hope this helps. -=-=-=-=-=-=-=-=- For ease of reading, any posted CODE should be wrapped by [ignore][COLOR] and Code: [/ignore] tags. Ex: Code: SELECT 1 from sysobjects TGML reference: http://www.tipmaster.com/includes/tgmlinfo.cfm?w=450&h=450"]