"      EXEC ('ALTER TABLE '+@tablename+' DROP CONSTRAINT '+@constraintname)\n"+ "      FETCH NEXT FROM refcursor INTO @tablename, @constraintname\n"+
"      EXEC ('ALTER TABLE '+@" + tableNameVar + "+' DROP CONSTRAINT '+@" + constraintNameVar + ")\n"+ "      FETCH NEXT FROM refcursor INTO @" + tableNameVar + ", @" + constraintNameVar + "\n"+
    public void testCharacterEscaping() throws Exception    {        assertEqualsIgnoringWhitespaces(            "SET quoted_identifier on;\n"+            "SET quoted_identifier on;\n"+            "IF EXISTS (SELECT 1 FROM sysobjects WHERE type = 'U' AND name = 'escapedcharacters')\n"+            "BEGIN\n"+            "  DECLARE @tablename nvarchar(256), @constraintname nvarchar(256)\n"+            "  DECLARE refcursor CURSOR FOR\n"+            "  SELECT object_name(objs.parent_obj) tablename, objs.name constraintname\n"+            "    FROM sysobjects objs JOIN sysconstraints cons ON objs.id = cons.constid\n"+            "    WHERE objs.xtype != 'PK' AND object_name(objs.parent_obj) = 'escapedcharacters'  OPEN refcursor\n"+            "  FETCH NEXT FROM refcursor INTO @tablename, @constraintname\n"+            "  WHILE @@FETCH_STATUS = 0\n"+            "    BEGIN\n"+            "      EXEC ('ALTER TABLE '+@tablename+' DROP CONSTRAINT '+@constraintname)\n"+            "      FETCH NEXT FROM refcursor INTO @tablename, @constraintname\n"+            "    END\n"+            "  CLOSE refcursor\n"+            "  DEALLOCATE refcursor\n"+            "  DROP TABLE \"escapedcharacters\"\n"+            "END;\n"+            "SET quoted_identifier on;\n"+            "CREATE TABLE \"escapedcharacters\"\n"+            "(\n"+            "    \"COL_PK\"   INT,\n"+            "    \"COL_TEXT\" VARCHAR(128) DEFAULT '\'\'',\n"+            "    PRIMARY KEY (\"COL_PK\")\n"+            ");\n",            createTestDatabase(COLUMN_CHAR_SEQUENCES_TO_ESCAPE));    }