title: @@error in sql server , what alternate into Mysql server
body: <blockquote>
    <p>@@Error :this for exception handling into sql server.but i have no
    idea into Mysql server.</p>
    
    <p>So Anybody please help on this,</p>
    
    <p>i shall be thankful to you.</p>
  </blockquote>
  
  <p><strong>For Example</strong></p>
  
  <p><strong>sql server</strong> Code like this </p>
  
  <pre><code>If (@@error &lt;&gt; 0)
       Begin
        Raiserror (50002, 11, 1)
        Rollback transaction
        goto Bailout
     End 
  </code></pre>
  
  <p><strong>Mysql code</strong> </p>
  
  <pre><code> If @@error &lt;&gt; 0    # getting Error 
     Then
       Signal  SQLSTATE '02000' SET MESSAGE_TEXT = 50084
       Rollback;     #getting Error
     End if;
  </code></pre>
  
  <blockquote>
    <p>i just want to convert sql server code to mysql server code.</p>
  </blockquote>
  
  <p>Thanks
  Aman</p>