SQLTableRename - cDbUpdateFunctionLibrary
Renames a SQL table name.
Type: Function
Parameters: Integer hTable, String sCurrentTableName, String sNewTableName
Parameter |
Description |
hTable |
The name of the SQL table to be renamed. |
sCurrentTableName |
The present table name to be changed. |
sNewTableName |
The new name for the table. |
Syntax
Procedure SQLTableRename Handle hTable String sCurrentTableName String sNewTableName
Call: |
Send SQLTableRename MyTableName.File_Number "CurrentTableName" "NewTableName" |
Description
Use it to change a table name.
Note: If you want to change a table name with the DataFlex Embedded database, use the API based ApiTableRename function instead.
Different SQL back-ends has different maximum allowed length of a table name.
Max number of characters allowed for table names;
MySQL = 64
IBM DB2 = 128
MS-SQL = 128
PostgreSQL = 64
Oracle = 128 (Version 12.2 and later. 30 characters for earlier versions)
Example
Procedure OnUpdate
Boolean bOK
Get SQLTableRename Order.File_Number "CurrentTableName" "NewTableName" to bOK
End_Procedure