The problem of function usage in MySQL

use functions to query

SELECT
    CATALOG_ID,
    PARENT_ID,
    getParentList (1519644122048414430)
FROM
    t_knowledge_catalog;

how do I pass the CATALOG_ID of each row of data to the getParentList function to find out different data for different rows?

Mar.19,2021

found the reason
wrote this before

SELECT
    CATALOG_ID,
    PARENT_ID,
    getParentList (CATALOG_ID)
FROM
    t_knowledge_catalog;

error [Err] 1265-Data truncated for column.
is caused by a mismatch between the defined function type and the input parameter, one is varchar (50) and the other is varchar (64)

Menu