0
ALTER PROCEDURE [dbo].[SP_GET_DDLPage]
AS
BEGIN
SELECT NULL AS 'ID', '--None--' AS 'DSC'
UNION
SELECT MSP_NM AS 'ID', MSP_TITLE AS 'DSC'
FROM MST_PAGE
WHERE MSP_STS = ACTIVE ORDER BY MSP_NM
END
我得到一個錯誤說:的MySQL應用的 「ORDER BY」 子句UNION查詢
MSP_NM是無效的列
我該如何解決這個問題的查詢,也爲了通過MSP_NM
?
這看起來更像是SQL Server的語法,而不是MySQL,標識符周圍的方括號以及對「dbo」,「ALTER PROCEDURE」語句的引用... – spencer7593