'I am facing Issue in Inserting the Data in the Table

INSERT INTO aftmm_trans_content_rq
(project_id, rq_sno, stnd_key, locale_cd, clssf_cd, seq, "content", content_xpln, trtr_id, trt_dtm,trans_verify_yn)
VALUES('META',' 203','DESC-00026','ko_KR','DESC ','1','27011041-Korean','test00','20220127141206','Y');

I am getting the SQL Error as

SQL Error [42601]: ERROR: INSERT has more target columns than expressions Position: 127



Solution 1:[1]

Obviously, database doesn't lie about it.

INSERT INTO aftmm_trans_content_rq (project_id,         -- 1
                                    rq_sno,             -- 2
                                    stnd_key,           -- etc.
                                    locale_cd,
                                    clssf_cd,
                                    seq,
                                    "content",
                                    content_xpln,
                                    trtr_id,
                                    trt_dtm,
                                    trans_verify_yn     -- 11
                                    ) 
     VALUES ('META',                                    -- 1
             ' 203',                                    -- 2
             'DESC-00026',                              -- etc.
             'ko_KR',
             'DESC ',
             '1',
             '27011041-Korean',
             'test00',
             '20220127141206',
             'Y'                                        -- 10
             );

You're inserting 10 values into 11 columns, and that's a mismatch.

Solution 2:[2]

You have provided More(11) fields while giving less(10) values respectively, and hence the DB error.

Please remove a field from field list which you think is going to be set my default or add the appropriate value.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Littlefoot
Solution 2 Destroyer