I'm going to answer this question based on the information before the edit, as I personally feel it was still vital to the answer.
Have you heard of Pseudocode?
When I got hired for a software job I only managed to get half the tasks working. Mainly because I had to code in a language I never saw before and the syntax was different (I told them beforehand and they told that wouldn't be a problem). So for every piece of code that I couldn't get working I wrote some pseudocode.
// Place a for loop here, For as long as i < [var].Length then do this other thing.
The most important thing is that you get inside the software engineer's mind. Know how he intends to code. After that you need to ask yourself how easy it would be to bring him to a level where he can be placed to work on larger projects. Usually this will take between 1~2 months anyway.
Furthermore, I would HIGHLY recommend to let him use the internet for code referencing. Coding requires a HUGE amount of looking up codes in order to learn them.
Once he's done, and you're worried he just copied some code he doesn't understand, just ask him about the code itself. Why did he use this variable here? Why did he name it like that instead of fully spelling it out? Why use a for loop instead of a while? etc etc. These might be silly questions, but if he's bullshitting you, he shouldn't be able to answer any of this.
Also, try to make your steps as independent as possible and then leave him to his thing while you grab some coffee and do other stuff. If he gets stuck on anything, he can simply skip it and proceed with the next. A lot of coders don't perform well if they are being watched. So by enabling him to do his own thing, he should have that chance. I'd still pop in every 15~30 mins in case he has any problems/questions. Also, this allows you to see if he's a coder that will keep asking questions before trying to find answers online first.
As for the SQL tasks, I feel like you were too easy on them. I'd show them a small SQL database model and tell them you want to add a certain item, but don't wish to edit any of the current tables. Asking him what his suggestion would be in order to implement the change. And also why. basically talk the information out of him. I'd still ask how to make an update/insert/create query though. He can find that stuff within 2 seconds, but if he can't it's an easy way to see if he's bullshitting you.
Bottom line is, you need to understand how he thinks. Not how good he is at coding.
Also, you may want to tell him before the test, what kind of things he can expect (not in detail, just the outlines). That way he may prepare himself better.