The ISO-standard SQL specifies double dash, --, as a single line comment identifier. Example:
SELECT * FROM Inventory WHERE category = 2 -- Category 2 is electronics
Additionally, the database system may allow for C-style /* ... */ multi-line comments, as well.
1. Just to check: Are this comments preserved in database when executing CREATE TABLE, ALTER TABLE commands ?
2. Some databases (MSSQL) allows to annotate schema elements (tables, columns) with additional documentation, which is then stored in the database. Is it part of the SQL standard? What other databases allows for that?
3. I've seen many databases schemas with external documentation, generated with different documentation tools. I'm particularly interested in tools that support a designer to annotate particular schema elements and generate external documentation (PDF, HTML, DOC ?). What are the most popular tools for schema documentation? (any survey on that?)
4. What are the most popular formats for documentation output? Any examples, I can browse to see how they are formated, structured?