Αποτελέσματα Αναζήτησης
You can use the RENAME statement to rename an existing table. To rename columns, use the ALTER TABLE statement. About this task. When renaming tables, the source table must not be referenced in any existing definitions (view or materialized query table), triggers, SQL functions, or constraints.
The RENAME TABLE statement returns an error if the target table is referenced in a view definition or an SQL table function, unless the RENAMETABLE subsystem parameter is set to ALLOW_DEP_VIEW_SQLTUDF.
if you want to rename a table in the same schema, you can use like this. RENAME TABLE schema.table_name TO "new_table_name"; Otherwise, you can use tools like DBeaver to rename or copy tables in a db2 db.
To change the name of an existing table to a new one, you use the RENAME TABLE statement. Here is the syntax of the RENAME TABLE statement: RENAME TABLE table_name TO new_table_name; Code language: SQL (Structured Query Language) ( sql )
5 Ιουλ 2013 · You can rename the table with the admin_mov_table stored procedure. Here the information: http://publib.boulder.ibm.com/infocenter/db2luw/v10r1/topic/com.ibm.db2.luw.sql.rtn.doc/doc/r0055069.html. call SYSPROC.ADMIN_MOVE_TABLE ('myschema', 'X', 'Y', '', 'MOVE'); answered Jul 5, 2013 at 15:10.
RENAME TABLE invalidates any packages that are dependent on the source table. RENAME INDEX invalidates any packages that are dependent on the source index. If an alias is used for the source-table-name, it must resolve to a table name. The table is renamed within the schema of this table.
9 Αυγ 2017 · Syntax: mysql -u user_name -p password -e 'SQL Query' database. Clearificance: -u : Specify mysql database user name. -p : Prompt for password. -e : Execute sql query. database : Specify database name. Example: If you want to create a table person then: