change field name SQL

Results 1 to 2 of 2

Thread: change field name SQL

  1. #1
    Join Date
    Dec 1969

    Default change field name SQL

    Does anyone know the syntax for a query statement to chang a field name in Access remotely?

  2. #2
    Join Date
    Dec 1969

    Default RE: change field name SQL

    You might want to just use Access! Doing it in code is pretty cumbersome and most people don&#039t think doing DDL on the fly is such a great idea. Anyway, here&#039s the sql...<BR><BR>sql = "ALTER TABLE MYTABLE ADD NEWCOL TEXT (50) NULL"<BR>cn.Execute sql<BR>sql = "UPDATE MYTABLE SET NEWCOL = OLDCOL"<BR>cn.Execute sql<BR>sql = "ALTER TABLE MYTABLE DROP COLUMN OLDCOL"<BR>cn.Execute sql<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts