This query:
- Accesses the table through the teradata1 foreign server
- Retrieves Buick vehicle records from the remote cardata table
- Converts the selected columns to the specified data types before returning the results
SELECT CAST(Price AS DECIMAL(8,2)),
mileage,
CAST(make AS VARCHAR(20)),
CAST(model AS VARCHAR(20))
FROM teradata1.default.cardata
WHERE make = 'Buick';
Result:
price mileage make model
-------- ------- ------ --------------------
17314.10 8221 Buick Century
17542.04 9135 Buick Enclave