question

Dave 1 avatar image
Dave 1 asked

Policy for fieldnames

There doesn't appear to be a facet for field names.

I want to create a policy to block ambiguous names such as id, name, description. Having a policy to block reserved words would be good too.

best-practice
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
TimothyAWiseman avatar image
TimothyAWiseman answered

One option would be use a DDL trigger which will rollback with an error any attempt to use the field names that are not approved of.

Perhaps a better option is to reserver the priveleges to create or modify tables to only those who both have a need to do it and an understanding of the local policies on how to name them. This is especially true if your procedure involves ambiguities that are hard to put into code such as: no ambiguous field names.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.