Data Science/DB+SQL
[MYSQL] SELECT 문에서 ORDER BY 조건 동적으로 설정
DELIMITER $$ CREATE DEFINER=`root`@`localhost` PROCEDURE `GetCustomers_Pager`( _PageIndex INT ,_PageSize INT ,_SortExpression VARCHAR(50) ,_SortDirection VARCHAR(50) ,OUT _RecordCount INT ) BEGIN SET @RowNumber:=0; CREATE TEMPORARY TABLE Results SELECT @RowNumber:=@RowNumber+1 RowNumber ,CustomerID ,ContactName ,CompanyName FROM Customers -- CASE WHEN THEN END 활용한 ORDER BY 조건 설정 ORDER BY CASE WH..
2021. 7. 21. 16:45
최근댓글