oracle11g - SQL Error Missing Right Parenthesis -
i new sql , running on command prompt orcale 11g installed
create table transaction( transaction_id number primary key, account_no number foreign key references account_creation(account_no), transaction_date date, amount number, transaction_type varchar2(5) check( transaction_type=’c’ or transaction_type=’d’), current_balance number, branch_code varchar2(10) ); i error907 @ line 4 saying missing right parenthesis doing wrong?
if line correct:
transaction_type varchar2(5) check( transaction_type=’c’ or transaction_type=’d’), then have wrong single quotes in line. seek this:
transaction_type varchar2(5) check( transaction_type = 'c' or transaction_type = 'd'), or, improve yet:
transaction_type varchar2(5) check( transaction_type in ('c', 'd')), sql oracle11g
No comments:
Post a Comment