I would appreciate if anyone with experience using SQLite in mql5 can show me how to check for existence of a primary id in a given table. For example is my table has long values as primary ids, does that mean I can use DatabaseColumnLong() to retrieve the value in a given column and store it in a variable a then compare against another variable whose existence im trying to check for? OR is there a built in function that can return the value a true or false (1 or 0) if a given value exists in a column in SQLite database table ? .
I would love if you showed me some examples too if you are okay with that. I’ve read some documentation in trying to research this and I was confused alittle hence coming here to ask this .
- Principles of database operations in MQL5
- Structure of tables: data types and restrictions
- Reading fields separately: DatabaseColumn Functions

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register