I'm trying to write an error handler which will insert any errors into a log table so that I can log them and look at them later. The reason I want to use my own table to log errors is I can add additional information for example which line of a source file crashes my log procedure. I know that "DECLARE EXIT handler for sqlexception" will catch the error. I've read about "Show Errors;" But how to I do an "insert into MyErrorLogTable (....) show errors", so that I put the errors into a log table?