Assignment semantics in a federated system - examples
The following table shows several examples of the application of federated assignment semantics in queries given a local type and remote type.
| Local type | Remote type | Your query | Generated remote query |
|---|---|---|---|
| FLOAT | INTEGER | set c1=123.23 | set c1=INTEGER(123.23) |
| INTEGER | FLOAT | set c1=123.23 | set c1=INTEGER(123.23) |
| FLOAT | INTEGER | set c1=123 | set c1=123 |
| CHAR(10) | CHAR(20) | set c1='123' | set c1='123' ('123' has a type VARCHAR(3) and it's the shortest of all) |
| CHAR(10) | CHAR(20) | set c1=char23col | set c1=CHAR(char23col, 10) |
| CHAR(10) | CHAR(20) | set c1=expr1 |
|
| TIMESTAMP | DATE | set c1= current timestamp | set c1=DATE(current timestamp) |