DB/Mssql
문자열형 id 추가하는 방법
innocent_k
2015. 4. 10. 09:16
SELECT LPAD(LPAD(MAX(SUBSTR(position_id, 2)) +1,4,0),5,'P') FROM position
-> P0001 나옴