Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Converting an Oracle schema DDL for MonetDB fails to create a column named "no". #3079

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments

Comments

@monetdb-team
Copy link

@monetdb-team monetdb-team commented Nov 30, 2020

Date: 2012-05-06 12:36:58 +0200
From: Kendall <>
To: SQL devs <>
Version: 11.3.7 (Apr2011-SP2) [obsolete]
CC: kendallarium, @njnes

Last updated: 2012-05-25 12:58:46 +0200

Comment 17221

Date: 2012-05-06 12:36:58 +0200
From: Kendall <>

User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19
Build Identifier: monetdbd[7854] 1.6 (Apr2012)

An Oracle schema sql creates a table that has an integer column with label "no".

There's an issue when creating a table with column name "no" in MonetDB:

sql>create table test1 (
more>no int);
42000!syntax error, unexpected NO, expecting FOREIGN or PRIMARY or UNIQUE in: "create table test1 (
no int"

Reproducible: Always

Steps to Reproduce:

  1. Install MonetDB and create/start/release a new database (monetdbd/monetdb)
  2. Use mclient to connect and create new table with an int column named 'no'
  3. Observe error produced by step2:" 42000!syntax error, unexpected NO"

Actual Results:

Welcome to mclient, the MonetDB/SQL interactive terminal (Apr2012)
Database: MonetDB v11.9.1 (Apr2012), 'mapi:monetdb://localhost:50000/mydb'
Type \q to quit, ? for a list of available commands
auto commit mode: on
sql>create table test (
more>no int);
42000!syntax error, unexpected NO, expecting FOREIGN or PRIMARY or UNIQUE in: "create table test (
no int"

Expected Results:

Welcome to mclient, the MonetDB/SQL interactive terminal (Apr2012)
Database: MonetDB v11.9.1 (Apr2012), 'mapi:monetdb://localhost:50000/mydb'
Type \q to quit, ? for a list of available commands
auto commit mode: on
sql>create table test (
more>no int);
operation successful (2.404ms)

--The database appears to support most of the Oracle DDL, with minimal rewrites for constraints and differences in dialect. Here's an example testing syntax with the only difference being the column named 'id' rather than 'no'.

Welcome to mclient, the MonetDB/SQL interactive terminal (Apr2012)
sql>create table test (
more>id int);
operation successful (2.404ms)
sql>select * from test;
+----+
| id |
+====+
+----+
0 tuples (0.795ms)

Regarding the Error:"42000!syntax error, unexpected NO", The usage of the word "NO" should not be reserved, considering that other databases such as Oracle, PostgreSQL, MySQL allow the application to install with a column named 'no'.

Comment 17224

Date: 2012-05-07 08:41:43 +0200
From: @njnes

fixed by adding 'no' to the non-reserved keywords

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant