I have a table called Table A which is empty. I need to add a value from one particular column from another table.
How do i insert this and what is the syntax? Can anyone help me out as i am new to this?
Two tables looks same and you want to insert only zip_code alone from table t2 into t1. But table t1 contains not null columns.
If you try to do as what i said earlier it tries to keep nulls in all columns of table1 except zip_code.
So as per table1 definition u cant add a row with null values in record_id,degree_zip,version_id.
so try doing
insert into table1 ( record_id,degree_zip,version_id)
select key_id,degree_zip,version_id from table2;