Skip to content

CREATE TABLE doesn't allow to have column names in quotes #4

Closed

Description

@vasilievip

http://sourceforge.net/tracker/?func=detail&aid=3068961&group_id=104597&atid=638634

Since this "hub" doesn't allow attachments, here is the change which works for me

--- a/src/main/javacc/net/sf/jsqlparser/parser/JSqlParserCC.jj
+++ b/src/main/javacc/net/sf/jsqlparser/parser/JSqlParserCC.jj
@@ -1523,7 +1523,11 @@ CreateTable CreateTable():
    [
        "("

-       columnName=<S_IDENTIFIER>
+       (
+           columnName=<S_IDENTIFIER>
+           |
+           columnName=<S_QUOTED_IDENTIFIER>
+       )
        colDataType = ColDataType()
        {
            columnSpecs = new ArrayList();
@@ -1582,7 +1586,11 @@ CreateTable CreateTable():
                )
                |
                (
-                   columnName=<S_IDENTIFIER> 
+                    (
+                        columnName=<S_IDENTIFIER>
+                        |
+                        columnName=<S_QUOTED_IDENTIFIER>
+                    )

Activity

  1. wumpz commented on May 25, 2012

    @wumpz
    Member

    Maybe you should use RelObjectName() instead of your production.

  2. wumpz commented on May 26, 2012

    @wumpz
    Member

    After investigating I must say, your solution is better. But you have to change more than one occurance of <S_IDENTIFIER> in this production.

  3. vasilievip commented on May 27, 2012

    @vasilievip
    Author

    yep, thanks

  4. wumpz commented on May 28, 2012

    @wumpz
    Member

    I have included this in my fork. Additional I corrected the CreateTableDeParser.

  5. added a commit that references this issue on Dec 22, 2022
    8d9db70
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions