A forex agency needs a simple table to keep track of the currency exchanges they perform.
Create a table called
exchange with the following columns:
id - an integer which is the primary key,
currency_from - exactly three characters,
currency_to - exactly three characters,
quantity - a decimal field of 10 digits, 2 out of which are after the decimal point,
rate - a decimal field of 6 characters, 2 out of which are after the decimal point,
time - a field with date and time.
Mind the following requirements:
- No column can be a NULL.
- The columns
rate must be greater than zero.
- If no value is provided, the default
quantity is 100.00.