set @totalTicketCount=12;
select @totalTicketCount;
MySQL [dback012135]> select @totalTicketCount;
ERROR 1706 (HY000): Feature 'user-defined variables without a SET clause or WHERE clause' is not supported by MemSQL.
set @totalTicketCount=12;
select @totalTicketCount;
MySQL [dback012135]> select @totalTicketCount;
ERROR 1706 (HY000): Feature 'user-defined variables without a SET clause or WHERE clause' is not supported by MemSQL.
MemSQL only supports user-defined variables inside the scope of a stored procedure/UDF, or, through the LOAD DATA clause upon selecting columns to ingest. See Unsupported MySQL Features · SingleStore Documentation
Thanks!
I am more interested in why it is not supported, is it distributed?
select into x is not support ?
DELIMITER //
CREATE PROCEDURE test() AS
DECLARE
c INT;
BEGIN
ECHO SELECT COUNT(*) INTO c FROM guide_order_cs;
END //
DELIMITER ;
No, that’s not supported. You need to use the SCALAR() or COLLECT() functions to get the result of a query. You can then assign the value or values into a variable.