Reason:
if you enter the date directly without specifying the date format, it will cause the inserted time format to be inconsistent with the existing time format in the database, resulting in an error.
:
CREATE TABLE STU_CON
(
No. CHAR(4),
Name CHAR(9),
Sex CHAR(3),
DATE,
Home address VARCHAR2(50),
CONSTRAINT PK_SID PRIMARY KEY (student number),
CONSTRAINT UK_NAME UNIQUE,
CONSTRAINT CK_BDAY CHECK(Date of Birth>'1988-01-01')
)
So you have to specify the date format, and if you can use TO_DATE, you have to declare the date format as well.
for example:
to_date(‘ 1988-01-01 ‘) this would dig its own grave, so it should be written:
to_date(‘ 1988-01-01 ‘, ‘yyyy-mm-dd’)
to_date(‘ 1988-01-01 ‘, ‘yyyy-mm-dd’)
Read More:
- TypeError: unsupported format string passed to numpy.ndarray.__format__
- No match for ‘operator =’ both ends of the equal sign do not match
- C++ Primer Program in VsCode error: no match for call to ‘(std::__cxx11::string…)
- [Solved] Canal Error: CanalParseException: column size is not match,parse row data failed
- error: src refspec master does not match any [How to Solve]
- error: src refspec master does not match any. [How to Solve]
- error: src refspec master does not match any [How to Solve]
- [Solved] Error: SRC refspec master doors not match any
- [Solved] MindSpore Error: ValueError: Minimum inputs size 0 does not match…
- [Solved] lightdb oracle_fdw Error: ERROR: error connecting to Oracle: OCIEnvCreate failed to create environment handle
- [Solved] error LNK2038: Detected mismatch of “RuntimeLibrary”: The value “MDd_DynamicDebug” does not match the value “MTd_StaticDebug”
- [Solved] Eureka Startup Error: Root name (‘timestamp‘) does not match expected type EurekaApplications
- Sublime text 3 does not support Chinese/[decode error – output not UTF-8] solution
- [Solved] rqt_graph Skipped loading plugin with error & Format: “dot“ not recognized
- [Solved] Camera Calibration Error: ErrorMessage: Image size does not match the measurement in camera parameters
- [Solved] Navicat Connect Error: Oracle library is not loaded.
- [Solved] QT cmak Compile Error: CMake Error: The source.. does not match the soused
- [Solved] error: taking address of temporary array av_make_error_string((char[AV_ERROR_MAX_STRING_SI…
- PLSQL even oracle11g problem on 64-bit machine: SQL*Net not properly installed and ORA-12154:TNS: cannot handle service name
- Android studio does not prompt error messages [How to Solve]