Skip to content
Advertisement

Tag: comments

SQL/Regex Challenge/Puzzle: How to remove comments from SQL code (by using SQL query)?

Requirements Single-lines comments (e.g. — my comment) should be removed. Multi-line comments (e.g. /* my comment */) should be removed. The content of strings literals (e.g. ‘this is a multi-line comment: /* my comment */’) should be ignored. The content of identifiers (e.g. “– column 1 –“) should be ignored. literals and identifiers Literals and identifiers can span over multiple

Are there multiline comment delimiters in SQL that are vendor-agnostic?

While editing, building up, or cherry picking from SQL statements I can find myself interacting with one of four popular database tools. I have been resorting to single line commenting for DB2 and Informix. I have created macros in Vim to make this slightly more efficient, but I was wondering if I am working too hard. Answer C style comments

Advertisement