> Before I spend too long looking, does anyone know if its possible 
> to ALTER TABLE and insert a field in other than the last 
> ordinal_position??? 
> This query adds a column in the last position.. 
> <cfquery name="addfield" datasource="#default_datasource#">
>     ALTER TABLE #table# ADD #form.column_name# 
> #form.type_name#<cfif #form.type_name# is 
> "varchar">(#form.length#)</cfif> #null#
> </cfquery>
> like so.
> column1
> column2
> the new column is added here
> 
> I want...
> column1
> Insert a column here
> column2

You could do this by rebuilding the table (overkill, but it'd work)

The big question is why you'd want to do it...
Since your SQL statement could be
SELECT COLUMN1, COLUMN2, COLUMN3
or
SELECT COLUMN1, COLUMN3, COLUMN2
it doesn't matter how they are laid out in the database

Philip Arnold
Director
Certified ColdFusion Developer
ASP Multimedia Limited
T: +44 (0)20 8680 1133

"Websites for the real world"

**********************************************************************
This email and any files transmitted with it are confidential and 
intended solely for the use of the individual or entity to whom they 
are addressed. If you have received this email in error please notify 
the system manager.
**********************************************************************


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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

Reply via email to