QueryRenameColumn()

Rename a column

Introduced: 6.0.0.57

QueryRenameColumn( query=query, column=string, newColumnName=string );

Returns: void

Argument Description
query
query, required

Name of a query object.

column
string, required

Name of the column to rename.

Alias: columnName

newColumnName
string, required

New name of the column.

Examples

qry= queryNew( "name , age" , "varchar , integer" , [ [ "Susi" , 24 ] , [ "Urs", 28 ] ]);
<span class="nf">writeOutput</span><span class="p">(</span><span class="s2">&quot;Before changing the QueryColumn name : &quot;</span><span class="p">);</span>
<span class="nf">writeDump</span><span class="p">(</span><span class="nv">qry</span><span class="p">);</span>
<span class="nf">QueryRenameColumn</span><span class="p">(</span> <span class="nv">qry</span><span class="p">,</span> <span class="s2">&quot;name&quot;</span><span class="p">,</span> <span class="s2">&quot;employee&quot;</span> <span class="p">);</span>
<span class="nf">writeOutput</span><span class="p">(</span><span class="s2">&quot;After changing the QueryColumn name : &quot;</span><span class="p">);</span>
<span class="nf">writeDump</span><span class="p">(</span><span class="nv">qry</span><span class="p">);</span>

See also