I’m working with a database that keeps track of where a reader is in a book. I do this by having a page count column and a current page column.
Is there a way to add a ‘progress’ column that would be equal to (currentpage/pagecount)?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You have two options. You can either create that field on
SELECT:Or create a
VIEW, which will allow you to query it without explicitly stating the operation:Then you can just query your view as a normal table:
More information about Arithmetic Operators and Views are available in the documentation: