kubo / rust-oracle

Oracle driver for Rust
193 stars 43 forks source link

execute create table sql error? #85

Closed yuyang-ok closed 5 months ago

yuyang-ok commented 6 months ago

I am using the lib to execute sql and I get a error. my sql is kind like this.

CREATE TABLE test_type1 (
            varchar2_col VARCHAR2(100),
            nvarchar2_col NVARCHAR2(100),
            char_col CHAR(10),
            nchar_col NCHAR(10),
            raw_col RAW(100)
        );

and I get this error

thread 'oracle::tests::test_type1' panicked at dbnexus-db\src\oracle.rs:643:14:
called `Result::unwrap()` on an `Err` value: OciError(DbError { code: 922, offset: 275, message: "ORA-00922: missing or invalid option", fn_name: "dpiStmt_execute", action: "execute" })
stack backtrace:

I use dbeaver to execute this every things looks fine.

kubo commented 6 months ago

Remove the last semicolon.

CREATE TABLE test_type1 (
            varchar2_col VARCHAR2(100),
            nvarchar2_col NVARCHAR2(100),
            char_col CHAR(10),
            nchar_col NCHAR(10),
            raw_col RAW(100)
        )
yuyang-ok commented 6 months ago

@kubo thanks I try later

yuyang-ok commented 5 months ago

@kubo thanks.