Last Inserted ID for MySQL. #1206
              
                
                  
                  
                    Answered
                  
                  by
                    aitva
                  
              
          
                  
                    
                      abhishek-hotstar
                    
                  
                
                  asked this question in
                Q&A
              
            -
| CREATE TABLE IF NOT EXISTS student /* name: InsertStudent :exec */ The result only returns an error, not the  Thank you. | 
Beta Was this translation helpful? Give feedback.
      
      
          Answered by
          
            aitva
          
      
      
        Sep 21, 2021 
      
    
    Replies: 1 comment
-
| You can get an  CREATE TABLE IF NOT EXISTS student
(
id INT PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(50) NOT NULL
);
/* name: InsertStudent :execresult */
INSERT INTO student (name)
VALUES (?); | 
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
      Answer selected by
        abhishek-hotstar
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
You can get an
sql.Resultby using the:execresultcommand: