So you don't mean something when you do an INSERT, but when you do the ALTER TABLE to add the column?
But then you assert that you want the default value of field2 to be the contents of field1, which might mean you intend that you want to affect each future insert. Then again, do you really mean to say that when you insert a new column, you want its value to be whatever was in field1 of that inserted record? Do you indeed really mean both? Just thought it might help to get more clarification. /charlie -----Original Message----- From: Scott Weikert [mailto:[EMAIL PROTECTED]] Sent: Friday, December 14, 2001 11:53 AM To: SQL Subject: Odd SQL7 question re: default values Is there a way, with SQL7 - when creating a field in a database table, to tell the default value to be the contents of ANOTHER field in that same table? For example I have Table1. It has Field1, a varchar(20) field. I want to create Field2, and I want the default value of Field2 for each row to be the contents of Field1 for that same row. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
