i have this query to generate custom generated ID but I think this is incorrect please help me
SELECT CONCAT('STUDENT-',COUNT(Id), + 1) FROM `students`;
i have this query to generate custom generated ID but I think this is incorrect please help me
SELECT CONCAT('STUDENT-',COUNT(Id), + 1) FROM `students`;
Change your query like this
SELECT
'STUDENT-' + CAST(COUNT(1) + 1 AS VARCHAR(20))
FROM
Students