Issue with SQL protected word
search cancel

Issue with SQL protected word

book

Article ID: 233017

calendar_today

Updated On:

Products

CA Test Data Manager (Data Finder / Grid Tools)

Issue/Introduction

Not sure if "Protected" is correct, but we have a table with the column name "Deny". When we try and create the table, it fails. We need to manually put brackets around Deny    [Deny]

Datamaker  4.9.1008.0

Environment

Release : 4.9.1

Component : Datamaker

Cause

DENY is a reserved word.

Resolution

"DENY" is a SQL reserved word:

https://www.drupal.org/docs/develop/coding-standards/list-of-sql-reserved-words

Developers should know what reserved words are in the databases they support and should avoid them just as they should bad practice naming convention for field names for their target databases. If you want to use a reserved work as a column name, you will have to put brackets around it.