using general expression when creating check constraint in pl/sql
CONSTRAINT "CUSTOMER_CK_PHONE" CHECK (REGEXP_LIKE ( phone, '^([0-9]*?\ ?\/?[0-9]{4}[0-9]{4})$ ' ) ) ENABLE
Achievement provides the only real pleasure in life
CONSTRAINT "CUSTOMER_CK_PHONE" CHECK (REGEXP_LIKE ( phone, '^([0-9]*?\ ?\/?[0-9]{4}[0-9]{4})$ ' ) ) ENABLE
Posted by SF at 10:09 pm 0 comments
symptom:
I installed 10g ex a while ago, now try to login, but forgot what the password was for the default username "system", can any one please help to retrieve the password?
fix:
SQL> conn / as sysdba
Connected.
SQL> alter user system identified by
Posted by SF at 11:28 pm 0 comments
for the header row, do this:
DBMS_OUTPUT.PUT_LINE(rpad(‘ID’,5) || rpad(‘LAST_NAME’, 15) || rpad(‘FIRST_NAME’,15) || lpad(‘ANNUAL_SALARY’,11) || lpad(‘TAX’,11) || lpad(‘COMMISSION_PCT’, 16));
DBMS_OUTPUT.PUT_LINE(rpad(‘____ ’,5) || rpad(‘_______________’, 15) || rpad(‘_______________’,15) || lpad(‘___________’,11) || lpad(‘___________’,11) || lpad(‘______________’, 16));
then in the loop I did:
DBMS_OUTPUT.PUT_LINE(rpad(r_emp.id,5) || rpad(r_emp.last_name, 15) || rpad(r_emp.first_name,15) || lpad(v_an_sal,11) || lpad(v_tax,11) || lpad(v_com_pct, 16));
not very enjoyable way of formating, but it worked......
Posted by SF at 9:10 pm 0 comments
select * from user_indexes
where table_owner like 'xxxxxx' and table_name like 'ABC';
Posted by SF at 8:29 pm 0 comments