SELECT TO_NUMBER(CASE WHEN EXISTS (SELECT 1 FROM TB_RSE_MSTR)
                             THEN (SELECT TRIM(MAX(TO_NUMBER(ID)) + 1) 
                                     FROM TB_RSE_MSTR)  
                             ELSE '1' END) ID                                             
FROM DUAL                                                    



SELECT ID,              
       RSE_ID,          
       ROAD_SPOT_ID,    
       LOG_CNNC_ID,     
       LOG_CNNC_PW,     
       ISTL_LCTN_NM,    
       LCTN_X,          
       LCTN_Y,          
       IP,              
       PORT,            
       MNFC_CMPY_CD,    
       DEL_YN           
  FROM TB_RSE_MSTR      
  
  
  
  UPDATE TB_RSE_MSTR          
     SET RSE_ID       = '1', 
         ROAD_SPOT_ID = '1', 
         LOG_CNNC_ID  = '1', 
         LOG_CNNC_PW  = '1', 
         ISTL_LCTN_NM = '1', 
         LCTN_X       = '1', 
         LCTN_Y       = '1', 
         IP           = '1', 
         PORT         = '1', 
         MNFC_CMPY_CD = '1', 
         DEL_YN       = '1'  
   WHERE ID = '1'            
   
   
   
   UPDATE TB_FCLT_INFR       
      SET FCLT_LCTN  ='9' 
    WHERE FCLT_ID    = 'i'  
