如何将现有Blob列上的DEFAULT值设置为EMPTY_BLOB()

时间:2019-04-11 06:55:52

标签: sql oracle blob ddl

我试图通过为Oracle数据库中的BLOB列添加默认值来更改表,并具有以下内容:

ALTER TABLE TEST_TABLE
    MODIFY (BLOB_0 BLOB(4000) DEFAULT EMPTY_BLOB())

但是出现以下错误:

SQL Error: ORA-00907: missing right parenthesis

能做到吗?

2 个答案:

答案 0 :(得分:3)

尝试这个:

ALTER TABLE TEST_TABLE
    MODIFY BLOB_0 DEFAULT EMPTY_BLOB() 

答案 1 :(得分:0)

删除BLOB的大小(4000):

TypeError: token.split is not a function
    at JwtHelperService.push../node_modules/@auth0/angular-jwt/src/jwthelper.service.js.JwtHelperService.decodeToken (jwthelper.service.js:70)
    at AuthService.push../src/app/auth/shared/auth.service.ts.AuthService.saveToken (auth.service.ts:26)
    at MapSubscriber.project (auth.service.ts:20)
    at MapSubscriber.push../node_modules/rxjs/_esm5/internal/operators/map.js.MapSubscriber._next (map.js:35)
    at MapSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next (Subscriber.js:54)
    at MapSubscriber.push../node_modules/rxjs/_esm5/internal/operators/map.js.MapSubscriber._next (map.js:41)
    at MapSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next (Subscriber.js:54)
    at FilterSubscriber.push../node_modules/rxjs/_esm5/internal/operators/filter.js.FilterSubscriber._next (filter.js:38)
    at FilterSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next (Subscriber.js:54)
    at MergeMapSubscriber.push../node_modules/rxjs/_esm5/internal/operators/mergeMap.js.MergeMapSubscriber.notifyNext (mergeMap.js:84)

或仅将默认值添加到表中:

ALTER TABLE TEST_TABLE
    MODIFY (BLOB_0 BLOB DEFAULT EMPTY_BLOB());