Quote:
I have a database table named as "vehicle" and it includes two columns named as "expiry date" and "DaysLeft",
Advice: Never put volatile data in database, it is a design flow.
Volatile data is data that change very often, like every day. Because in order to use that column "DaysLeft", you always have to update it unless you know that update have already been done. Believe me, it is a major pain in real situation.
Never build an SQL query by concatenating strings. Sooner or later, you will do it with user inputs, anf this opens door to a vulnerability named "SQL injection", it is dangerous for your database and error prone.
A single quote in a name and your program crash. If a user input a name like "Brian O'Conner" can crash your app, it is an SQL injection vulnerability, and the crash is the least of the problems, a malicious user input and it is promoted to SQL commands with all credentials.
SQL injection - Wikipedia[
^]
SQL Injection[
^]