I would like to SELECT all the columns from my employees table + a an additional calculated column from the same table without manually typing all the columns.
I have thought about this:
SELECT *, salary *2 FROM employees;
However attempting to do so I get the error:
- 00000 - "FROM keyword not found where expected"
You would need to alias the table :
SELECT e.*, e.salary *2 FROM employees e;
You can try this
SELECT employees.*, employees.salary *2 FROM employees;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With