0

In Oracle ProC - we can give an array of values in where condition of a field.. i.e.

Select * from employee where emp_id = :m_emp_id

here m_emp_id is an array of employee ids. i.e. int m_emp_id[5] ; and array contains 5 empids: 100 - 104

In MariaDB or Mysql C-API, do we have any such way to implement the same functionality like ProC ?

We can generate multi statements with ; appending so..it gets 5 select statement with ; at end..

But I like to know, is there any other way of array binding concept like ProC in mysql/mariadb C-API ?

tadman
  • 208,517
  • 23
  • 234
  • 262
  • I'm not sure C is especially well situated to do this. The MySQL C API is *really* fundamental and basic. – tadman Jul 19 '22 at 06:15
  • There is no array datatype in MySQL/MariaDB. You may provide your array into the query in some serialized form and appy according function (CSV+FIND_IN_SET or JSON+JSON_CONTAINS, for example). – Akina Jul 19 '22 at 06:40
  • So for mysql / mariaDB C-API, we have no other way !! , but just to generate multi statements with ; appending and send to server for execution .. it would have been good if Mysql / mariadb C-API has such array / list binding functionality in WHERE condition !! – shibendra chakraborty Jul 19 '22 at 06:41

0 Answers0