Square root in SQLite studio
You should not define a Tcl procedure inside body of SQL function. Instead use only following line as function implementation (and nothing more):

expr {sqrt([lindex $argv 0])}


If you define a proc inside function definition you will be creating a new Tcl procedure each time you call the SQL function, which makes no sense, especially when you don't call that procedure in the end.

Anyway, stick to the simple implementation as mentioned above. That should do the work.