4. Maintaining a Distributed Database : Register as Link Statement--Define Database Objects to Ingres Star : Execute Immediate Statement--Execute Register as Link Statement Dynamically
 
Share this page                  
Execute Immediate Statement--Execute Register as Link Statement Dynamically
You can execute the register statement through dynamic SQL by the execute immediate statement.
For example, the following command registers the table customers from the database pacific on the node tokyo:
exec sql execute immediate
  â€˜register customers as link
  with node = tokyo, database = pacific’;
Note:  Do not use the prepare statement for executing the register as link statement. Use execute immediate as described here.