comments.err 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <sql-statement>
  2. --
  3. -- COMMENTS
  4. --
  5. SELECT 'trailing' AS first; -- trailing single line
  6. </sql-statement>
  7. <sql-statement>
  8. SELECT /* embedded single line */ 'embedded' AS second;
  9. </sql-statement>
  10. <sql-statement>
  11. SELECT /* both embedded and trailing single line */ 'both' AS third; -- trailing single line
  12. </sql-statement>
  13. <sql-statement>
  14. SELECT 'before multi-line' AS fourth;
  15. </sql-statement>
  16. <sql-statement>
  17. /* This is an example of SQL which should not execute:
  18. * select 'multi-line';
  19. */
  20. SELECT 'after multi-line' AS fifth;
  21. </sql-statement>
  22. <sql-statement>
  23. --
  24. -- Nested comments
  25. --
  26. /*
  27. SELECT 'trailing' as x1; -- inside block comment
  28. */
  29. /* This block comment surrounds a query which itself has a block comment...
  30. SELECT /* embedded single line */ 'embedded' AS x2;
  31. */
  32. SELECT -- continued after the following block comments...
  33. /* Deeply nested comment.
  34. This includes a single apostrophe to make sure we aren't decoding this part as a string.
  35. SELECT 'deep nest' AS n1;
  36. /* Second level of nesting...
  37. SELECT 'deeper nest' as n2;
  38. /* Third level of nesting...
  39. SELECT 'deepest nest' as n3;
  40. */
  41. Hoo boy. Still two deep...
  42. */
  43. Now just one deep...
  44. */
  45. 'deeply nested example' AS sixth;
  46. </sql-statement>
  47. <sql-statement>
  48. /* and this is the end of the file */
  49. </sql-statement>