Ask Your Question
1

What causes an error in SQLAlchemy and MariaDB when using a column named 'row_number'?

asked 2022-03-23 11:00:00 +0000

devzero gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2022-05-19 11:00:00 +0000

lalupa gravatar image

The error occurs because 'row_number' is a reserved keyword in MariaDB, and therefore cannot be used as a column name. SQLAlchemy generates SQL code that includes the column name without quoting it, which leads to a syntax error when MariaDB encounters the reserved keyword. To avoid this error, you should rename the column to something else.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-03-23 11:00:00 +0000

Seen: 12 times

Last updated: May 19 '22