Open Source RDBMS - Seamless, Scalable, Stable and Free

English | Login |Register

How to Quote Reserved Keywords

One important fact that you should know about any database management system is how to quote reserved keywords when you want to use them as column names or even table names.

If you want to know which are the Reserved Keywords, they are all listed in our manual page: Reserved Keywords

In CUBRID, you can use Reserved Keywords as table names or column names using one of the following 3 approaches:

  • Backtick Symbol - `
  • Double Quotes - "
  • Square Brackets - [

Let's assume you want to use a column name entitled VALUE. Acceptable table definitions are:

CREATE TABLE tst1 ([value] INT);
CREATE TABLE tst2 (`value` INT);
CREATE TABLE tst3 ("value" INT);

If you put value without using one of the escaping methods, then you will encounter the error "Syntax: syntax error, unexpected VALUE":


comments powered by Disqus
문서 정보
viewed 1880 times
번역 en
posted 2년 전
마지막 수정시간 2년 전
변경 내역 보기
Share this article