squirrel
squirrel copied to clipboard
Oracle DB Suffix
Hello, I got databases from Oracle, and I need help on how to correctly compose an Insert query My Code: query := sq.Insert("N_ACCOUNTS"). Columns("ACCOUNT_ID", "ACC", "MODIFIED_DATE", "CREATION_DATE", "LOCKED_FLAG", "NEED_REPLICATION"). Values(account.AccountId, account.Acc, account.ModifiedDate, account.CreationDate, account.LockedFlag, account.NeedReplication). PlaceholderFormat(sq.Colon). Suffix("RETURNING ID INTO :ACCOUNT_ID"). RunWith(runner) fmt.Println(query.ToSql()) err := query.QueryRow().Scan(&account.AccountId) if err != nil { return errors.Wrap(err, "repo.Add") } return nil
I got different errors, first the lack of the required keyword, and then the number of arguments exceeded the one found