Connect to web-service/API in MySQL?

后端 未结 2 1098
走了就别回头了
走了就别回头了 2020-12-12 02:05

I\'m creating a sql based procedure which can

  1. Accept a table
  2. load the values one at a time
  3. send the variables to a remote API
  4. Reco
2条回答
  •  独厮守ぢ
    2020-12-12 02:31

    The only way MySQL can call a webservice is through a custom UDF.

    See the below link, but basically what you would need to do is build a C program that would call the remote webservice API with the variables as parameters, return the reponse via the UDF to your actual SQL which could insert the results to a table. This is quite a lot of work though, especially if you are not at all familiar with C.

    http://www.codeguru.com/cpp/data/mfc_database/misc/article.php/c12615/MySQL-UDFs.htm

提交回复
热议问题