I am in a situation where a stored procedure have to execute
Query1:
开发者_如何学Cselect columnName from tablename where=(some condition)
and using the output of this query which I don't know in which data type to store it,I want to execute another query which has to be executed in the same stored procedure and which depends on output of query 1.
Query2:
select * from tablename where column2=(result of query1)
Please tell me how I can achieve this, basically I am looking for something like ResultSet in Java or DataReader in C# in Mysql.
select t2.col1, t2.col2, t2.col3 from tablename t2
join tablename t1 on t1.columnname = t2.column2
where (some condition)
Pick your columns like that, then you can check the table for an appropate variable to store the field
精彩评论