A check constraint, unfortunately, cannot reference a function like SYSDATE. You would need to create a trigger that checked these values when DML occurs, i.e.
|
martes, 15 de octubre de 2013
CHECK CONSTRAINT FECHA
jueves, 3 de octubre de 2013
FECHA FORMATO DDSPTH
SQL> SELECT TO_CHAR(SYSDATE,'MONTH DDSPTH') from dual;
TO_CHAR(SYSDATE,'MONTHDDSPTH')
------------------------------------------------------------------------
OCTOBER THIRD
SQL> SELECT TO_CHAR(SYSDATE,'YEAR MONTH DDSPTH') from dual;
TO_CHAR(SYSDATE,'YEARMONTHDDSPTH')
--------------------------------------------------------------------------------
TWENTY THIRTEEN OCTOBER THIRD
SQL> SELECT TO_CHAR(SYSDATE,'YEAR MONTH DAY DDSPTH') from dual;
TO_CHAR(SYSDATE,'YEARMONTHDAYDDSPTH')
--------------------------------------------------------------------------------
TWENTY THIRTEEN OCTOBER THURSDAY THIRD
TO_CHAR(SYSDATE,'MONTHDDSPTH')
------------------------------------------------------------------------
OCTOBER THIRD
SQL> SELECT TO_CHAR(SYSDATE,'YEAR MONTH DDSPTH') from dual;
TO_CHAR(SYSDATE,'YEARMONTHDDSPTH')
--------------------------------------------------------------------------------
TWENTY THIRTEEN OCTOBER THIRD
SQL> SELECT TO_CHAR(SYSDATE,'YEAR MONTH DAY DDSPTH') from dual;
TO_CHAR(SYSDATE,'YEARMONTHDAYDDSPTH')
--------------------------------------------------------------------------------
TWENTY THIRTEEN OCTOBER THURSDAY THIRD
Suscribirse a:
Entradas (Atom)