-
-
Notifications
You must be signed in to change notification settings - Fork 262
Open
Description
MySQL allows you to leave comments in place for table fields, as well as procedure and function parameters.
For example, for a table, it looks like this:
CREATE TABLE IF NOT EXISTS `mwr_essence`
(
`CODE_ESSENCE` int NOT NULL AUTO_INCREMENT COMMENT 'ID',
`CODE_GESSENCE` int NOT NULL COMMENT 'Object type ID',
`NAME` varchar(50) NOT NULL COMMENT 'Security object name',
PRIMARY KEY (`CODE_ESSENCE`),
UNIQUE KEY `UNQ_ESSENCE` (`NAME`),
KEY `FK_ESSENCE_GESSENCE` (`CODE_GESSENCE`)
) ENGINE = InnoDB
COMMENT = 'Security objects'
AUTO_INCREMENT = 1;Example for a stored procedure and its parameters:
CREATE PROCEDURE SP_MW_GRANT_ROLE(
IN A_MASTERROLE VARCHAR(50) COMMENT 'Master role name',
IN A_DETAILROLE VARCHAR(50) COMMENT 'Detail role name',
IN A_VALID INTEGER COMMENT 'If 1 then detail role is active, else is not active'
)
SQL SECURITY INVOKER
COMMENT 'Set role to another role'
BEGIN
/* ... */
ENDWhereas in our case, descriptions of objects, table fields, and procedure parameters are created only separately using the COMMENT ON statement, which is usually located quite far from the column, parameter, or package procedure/function being described. It would be great to be able to leave in-place comments in Firebird as well. This would make metadata creation scripts clearer.
dyemanov and dsonda
Metadata
Metadata
Assignees
Labels
No labels