Insert Select as a mysql database parameter

Asked

Viewed 31 times

0

I have a mysql database that receives some parameters, I would like to know how to pass as parameter a query.

Ex.: CALL sp_DisciplinaSave(SELECT ec.nome, ec.codigo, '' as sEmenta,'' as sCompetencias,'' as sConteudo,'' as sMetodologia,'' as sBibliografiaBasica,'' as sBibliografiaComplementar FROM db_ead.ac_cursos AS ec)

Procedure takes 8 parameters and select returns 8 columns, is that possible? What’s the right syntax?

  • Already evaluated the use of PREPARE / EXECUTE commands?

  • Not yet, as it would be?

  • https://dev.mysql.com/doc/refman/8.0/en/sql-syntax-prepared-statements.html

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.