I have a simple select statement in DBeaver which uses the same table name twice. To avoid typing it in twice, I have a @set statement to store the table name. However, if I select everything and try to run it, it stalls at the @set statement and doesn't move on to the select statement. What keyword or command am I missing to enable me to run this code in one go?
If this were "normal" SQL, I would probably use a return or go command, but DBeaver doesn't seem to like either of these.
To run a
@setstatement and aselectstatement in one go in DBeaver, you can use the semicolon;character as a separator like that:I hope it can help you.