How to call a procedure in a select statement

Hi im abhi from India,I am trying to call a procedure in select statement, because we cannot create memsql function with create keyword. so no other go other than procedure , but i need to use the procedure in select statement .Is there any other way.

Example : select id,name,f_name,a(id,name) from xxx - this is working in case a is a function
but i have a() as a procedure how do i implement in select stmt?

You can’t call an SP (e.g. sp1) in a SQL statement, but you can do this, in an SP body:

v_x = sp1(123, ‘xyz’);
select a, b into v_a, v_b
from t
where t.x = v_x;

But your use of function a() seems like you want it to be usable on a set of rows, not just to produce a single value. Consider doing things in two steps, like making a temp table
t(id, name, a) with SP logic, then doing a join like

select id, name, f_name, tmp.a from xxx, tmp
where xxx.id=tmp.id and xxx.name=tmp.name;

then drop the temp table tmp.

What is your sp a() computing? Maybe you can just include the code you were thinking of.