im using this sql query :
IF NOT EXISTS(SELECT 1 FROM Payments WHERE CustomerID = '145300')
INSERT INTO Payments(CustomerID,Amount)
VALUES('145300',12.33)
but i get this error:
Error
Static analysis:
1 errors were found during analysis.
Unrecognized statement type. (near "IF NOT EXISTS" at position 0)
SQL query: Documentation
IF NOT EXISTS(SELECT 1 FROM Payments WHERE CustomerID = '145300') INSERT INTO Payments(CustomerID,Amount) VALUES('145300',12.33)
MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INSERT INTO Payments(CustomerID,Amount)
VALUES('145300',12.33)' at line 2
this SQL query which I am using is from the answer of the question in this link : sql query
based an another answer, I even used END IF at the end of this statement but it didn't work yet.
how can solve this problem?