by applying this function on a column, Is the returned records is returned in order?
CREATE FUNCTION [dbo].[Remove] (@encrypt VARCHAR(200))
RETURNS TABLE
AS RETURN
(
WITH Numbers AS (
SELECT ROW_NUMBER() OVER (ORDER BY (SELECT NULL)) AS N
FROM master.dbo.spt_values)
SELECT
word = STRING_AGG(SUBSTRING(@encrypt, Numbers.N, 1), ”) WITHIN GROUP (ORDER BY
Numbers.N)
FROM Numbers
WHERE (Numbers.N – 1) % 2 <> 0
AND Numbers.N <= LEN(@encrypt)
);
I applied this function on a column to remove the second character from every data unit of column, I enquired about the returned records after applying this function, is returned in order? Also how to write this function with mysql