Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8788413
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T22:08:19+00:00 2026-06-13T22:08:19+00:00

I have to create a table and insert values into the tables. The tables

  • 0

I have to create a table and insert values into the tables. The tables is being created but it wont insert values.
heres my code-

CREATE TABLE CUSTOMER(
CID         number(20) not null primary key,        
FNAME       varchar2(50) not null,                  
MIDDLE      varchar2(50) null,
LNAME       varchar2(50) not null,
STREET      varchar2(50) not null,
CITY        varchar2(50) not null,
STATE       char(2) not null,
ZIP         varchar2(5) not null,
PHONE       varchar2(20) not null,
BIRTH_YR    date);

INSERT INTO CUSTOMER VALUES(
'1','john','paul','connor','Broad st','newark','nj','07103','2018643110','1992');

I keep getting an error

[Error] Script lines: 12-14 ------------------------
ORA-01861: literal does not match format string
Script line 14, statement line 2, column 85 

Can somebody help me out? What am i doing wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T22:08:20+00:00Added an answer on June 13, 2026 at 10:08 pm

    You must change the table definition to something like below to allow insertion of year in the format you need:

    CREATE TABLE CUSTOMER(
    CID         number(20) not null primary key,        
    FNAME       varchar2(50) not null,                  
    MIDDLE      varchar2(50) null,
    LNAME       varchar2(50) not null,
    STREET      varchar2(50) not null,
    CITY        varchar2(50) not null,
    STATE       char(2) not null,
    ZIP         varchar2(5) not null,
    PHONE       varchar2(20) not null,
    BIRTH_YR    char(4) not null);
    

    Otherwise, you have to provide literal date values in the default format accepted by your Oracle database. You can use this query to find out what is the date format accepted by your system:

    SELECT *
    FROM nls_database_parameters
    WHERE parameter LIKE '%DATE%'
    

    For me, it returns:

    NLS_DATE_FORMAT      |   DD-MON-RR
    ---------------------------------
    NLS_DATE_LANGUAGE    |   AMERICAN
    

    which means instead of ‘1992’, I should insert values such as '01-Jan-1992' in the BIRTH_YR column:

    INSERT INTO CUSTOMER
        VALUES('1','john','paul','connor','Broad st','newark','nj','07103','2018643110', '01-Jan-1992');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following test-code: CREATE TABLE #Foo (Foo int) INSERT INTO #Foo SELECT
I have the following table: CREATE TABLE TEST(ID TINYINT NULL, COL1 CHAR(1)) INSERT INTO
I have a table: create table Transactions(Tid int, amt int) With 5 rows: insert
I have created a test table in MySQL and would like to insert 10
I was tasked to create triggers to insert into a log table when an
I have two tables, locations and location groups CREATE TABLE locations ( location_id INT
I am new to iphone.I have a small doubt (i.e),I have create a table
I have a table: CREATE TABLE siteConfig ( settingName VARCHAR(64) NOT NULL, value VARCHAR(255),
I have a table CREATE TABLE `messages` ( `uid` BIGINT NOT NULL , `mid`
I have a table Create table Country_State_Mapping ( Country nvarchar(max), State nvarchar(max) ) With

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.