Skip to main content

This content has been archived and is no longer being updated.

Links may not function; however, this content may be relevant to outdated versions of the product.

Issue: Cannot use SQL keywords as database column names

Suggest edit Updated on September 13, 2021


If a database column for a PegaRULES table is named the same as a SQL keyword, then errors will occur.

For example, "Key" is a keyword for Microsoft SQL Server.  If a class is created with a property named "Key," and the class is mapped to a table with a column named "Key," then SQL syntax errors occur when accessing the class.

The errors that arise vary depending on the situation.  For example, the following error may occur in Tracer if an instance is written to a Microsoft SQL Server table that has an exposed column named Key, which is a reserved word in that database:

Problem writing an instance to the database: code: 156 SQLState: HY000 Message: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Incorrect syntax near the keyword 'Key'. 


Do not attempt to store Process Commander instances in a database table that has a column with the same name as a keyword.

Your application can use Rule-Connect-SQL rules and the RDB methods to access such a table, but be careful to create SQL that is free of syntax errors.  Often, this will mean adding double quote characters around any column names that are the same as keywords.


Pega Platform 7.1.1 - 8.3.1 System Architect System/Cloud Ops Administrator Data Integration
Did you find this content helpful? YesNo

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Ready to crush complexity?

Experience the benefits of Pega Community when you log in.

We'd prefer it if you saw us at our best. is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us