Teoman shipahi
Teoman shipahi

Reputation: 23132

Couchbase select reserved keyword named column

In my couchbase query I am receiving error because "Path" is a reserved keyword.

select RawUrl, Path from couchbaseSample order by CreateTimeUtc desc

[{"code":3000,"msg":"syntax error - at Path"}

I tried using [Path] but did not work.

How can I fix this problem?

Upvotes: 0

Views: 580

Answers (1)

geraldss
geraldss

Reputation: 2445

You can escape reserved words using back ticks.

select RawUrl, `Path` from couchbaseSample order by CreateTimeUtc desc

Upvotes: 2

Related Questions