I need to combine two tables into one.
Table s_ogr
id | ad | numara | yurt_id |
Current Table s_kontrol
id | ogr_id | yurt_id
What is needed s_kontrol_k
id | ogr_id | ogr_numara |ogr_ad | yurt_id `(ogr_id represent the id from s_ogr)`
( ad = name
, yurt_id = department_id
, ogr_id is student_number
(reason of problem, should be student_id) )
My Sittuation; s_kontrol
is full of data. I need it to be like s_kontrol_k
, but new two fields should be taken from s_ogr
table , by the match operation of s_ogr and s_kontrol (s_ogr.id=s_kontrol.ogr_id
and s_ogr.yurt_id =s_kontrol.yurt_id
). Previous mistake was not to add the ogr_id
as student_id
into s_kontrol
How to create my new s_kontrol_k
with filled values of new columns. I am able to copy the same values from s_kontrol but could'n achieve to fill new colums
Best Answer
As far as I can understand what you want is
First create the desired table
s_kontrol_k
and copy data from boths_ogr
ands_kontrol
to newly created tables_kontrol_k
.I hope this helps..