```

sqlite> select id,name,'table' from (select id, name, 'spells' as 'table' from spells union select id, name, 'npc' as 'table' from npc) where id=3242092362354582953;

3242092362354582953|Paul Soupman|table

```

SQL is a very reasonable language :neocat_floof_mug:

Reply to this note

Please Login to reply.

Discussion

nostr:npub1f8e6w3kg6cptk4ljl09ua3vezr7gws4jcuwyvzdnpytsnlp2yd6savzu5u I just wanted to let you know that single quotes make it a string literal in spite you were probably looking for double quotes which allow you to do what I think you were going for. Hope you figured that out and or this was a typo and you didn't spend all this time poring over what was wrong cause otherwise I think you're fine.

By the way instead of nested selects have you considered reformatting that into a CTE? Might help you with readability later.