3 ms·
Ask HN: How do you store your external SQL statements?
I was wondering what file format is considered appropriate for storing SQL statements outside of one's source code. I was considering XML (in CDATA tag). Any thoughts?
- svisser 11y agoHow about .sql files?
- angersock 11y agoThis. Remember, SQL statements are source code.
- ajuc 11y agoI imagine the problem is with assigning names to them. Usually I've seen people keeping them in hibernate xml with named queries, or some proprietrary .xml files. CDATA is overkill IMHO, easier to escape the few problematic characters.
- SayWhatIMean 11y agoNice becuase you can get SQL syntax highlighting.