title: Alter Multiple column Name and Data Type in PostgreSQL in one query
body: <p><strong>Description:</strong> I want to change column name and its data type. I have multiple columns and want to change all in one query along with their datatype.</p>
  
  <p><strong>What i tried</strong> </p>
  
  <ol>
  <li>Changing column type then renaming it.</li>
  </ol>
  
  <pre><code>ALTER TABLE customers  ALTER COLUMN phone TYPE numeric 
  RENAME COLUMN phone TO contact_phone
  </code></pre>
  
  <p>and</p>
  
  <pre><code>ALTER TABLE customers  ALTER COLUMN phone TYPE numeric,
  RENAME COLUMN phone TO contact_phone
  </code></pre>
  
  <ol start="2">
  <li>Changing multiple column type then renaming it.</li>
  </ol>
  
  <pre><code>ALTER TABLE customers  
    ALTER COLUMN phone TYPE numeric, 
    ALTER COLUMN address TYPE text, 
    RENAME COLUMN phone TO contact_phone,
    RENAME COLUMN address TO contact_address
  </code></pre>
  
  <ol start="3">
  <li>Tried to change all column data type then rename it</li>
  </ol>
  
  <pre><code>ALTER TABLE customers  
  ALTER COLUMN phone TYPE numeric,ALTER COLUMN address TYPE text
  </code></pre>
  
  <p>and</p>
  
  <pre><code>ALTER TABLE customers 
   RENAME COLUMN phone TO contact_phone,RENAME COLUMN address TO contact_address
  </code></pre>
  
  <p><strong>Issue:</strong>
  Each time I am getting an error in the <code>RENAME</code> clause which is 
  <strong>SQL State : 42601</strong> </p>
  
  <p>Can anyone tell me what is wrong with this query?</p>