Nested select in an insert
Hi, is there a better way to use nested
select inside an insert than to just use the sql function?
For example I have this function:
It works well, but by using the sql I lose the benefit of typescript and I have to execute the query to verify that it works as expected. If I, for example, use non-existing column in the sql, I won't get any warnings.
I could create a separate query to get the id_study_type, but I would prefer to have just one database call if possible.
0 Replies