Help Center/
    
      
      GaussDB/
      
      
        
        
        Developer Guide(Centralized_V2.0-8.x)/
        
        
        Application Development Guide/
        
        
        ECPG-based Development/
        
      
      Closing a Database Connection
    
  
  
    
        Updated on 2025-05-29 GMT+08:00
        
          
          
        
      
      
      
      
      
      
      
      
  
      
      
      
        
Closing a Database Connection
Close the database connection after the database is used.
  Close a connection.
  
 EXEC SQL DISCONNECT [connection];
  Declare the connection by using the following methods:
  
- connection-name
 - default
 - current
 - all
 
   Parent topic: ECPG-based Development
  
 Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
                The system is busy. Please try again later.
                
            
        For any further questions, feel free to contact us through the chatbot.
Chatbot