我在更新新添加的記錄時沒有將時間戳更新到同一數據庫中的另一個相同表中。這裏是我的查詢將表中的數據複製到另一個表MySQL
INSERT INTO mlscopy
SELECT * FROM mls_cvrmls AS parent
LEFT JOIN mlscopy AS child
ON child.listing_listnum != parent.listing_listnum
父表是由一個獨立的公司,每天早上更新了,可惜沒有時間戳(日期時間),以涉及新添加的記錄。
我的孩子表(副本)是谷歌地理編碼所必需的,因爲他們早上的孩子們每天早上都會放棄並創建父表。
我做了父表的結構和數據副本,然後刪除了最後十條記錄來測試我的查詢。但我不斷收到錯誤列計數不匹配第1行的值計數。
不能想到我在這裏做錯了什麼。
下面是列的表名
listing_listing
listing_listnum
listing_propertytype
listing_status
listing_listingpublicid
listing_agentname
listing_agentlist
listing_listingbrokercode
listing_officelist
listing_lo
listing_lo00
listing_lo01
listing_lo02
listing_lo03
listing_lo04
listing_lo05
listing_agentcolist
listing_agentcolist00
listing_officecolist
listing_area
listing_listdate
listing_listprice
listing_streetnumdisplay
listing_streetdirectional
listing_streetname
listing_streettype
listing_countyid
listing_zipcode
listing_zipplus4
listing_postoffice
listing_subdivision
listing_neighborhood
listing_schoolelem
listing_schooljunior
listing_schoolhigh
listing_pud
listing_lotdim
listing_acres
listing_zoning
listing_sqfttotal
listing_sqftunfinished
listing_rooms
listing_bedrooms
listing_stories
listing_basement
listing_garage
listing_garagecap
listing_fireplaces
listing_pool
listing_bathsfull
listing_bathshalf
listing_bathstotal
listing_bathsfullbsmt
listing_bathsfulllevel1
listing_bathsfulllevel2
listing_bathsfulllevel3
listing_bathshalfbsmt
listing_bathshalflevel1
listing_bathshalflevel2
listing_bathshalflevel3
listing_roombed2desc
listing_roombed2length
listing_roombed2level
listing_roombed2width
listing_roombed3desc
listing_roombed3length
listing_roombed3level
listing_roombed3width
listing_roombed4desc
listing_roombed4length
listing_roombed4level
listing_roombed4width
listing_roombed5desc
listing_roombed5length
listing_roombed5level
listing_roombed5width
listing_roomdiningdesc
listing_roomdininglength
listing_roomdininglevel
listing_roomdiningwidth
listing_roomfamilydesc
listing_roomfamilylength
listing_roomfamilylevel
listing_roomfamilywidth
listing_roomfloridadesc
listing_roomfloridalength
listing_roomfloridalevel
listing_roomfloridawidth
listing_roomfoyerdesc
listing_roomfoyerlength
listing_roomfoyerlevel
listing_roomfoyerwidth
listing_roomgreatdesc
listing_roomgreatlength
listing_roomgreatlevel
listing_roomgreatwidth
listing_roomkitchendesc
listing_roomkitchenlength
listing_roomkitchenlevel
listing_roomkitchenwidth
listing_roomlaundrydesc
listing_roomlaundrylength
listing_roomlaundrylevel
listing_roomlaundrywidth
listing_roomlivingdesc
listing_roomlivinglength
listing_roomlivinglevel
listing_roomlivingwidth
listing_roommasterbrdesc
listing_roommasterbrlength
listing_roommasterbrlevel
listing_roommasterbrwidth
listing_roomofficedesc
listing_roomofficelength
listing_roomofficelevel
listing_roomofficewidth
listing_roomother1desc
listing_roomother1length
listing_roomother1level
listing_roomother1width
listing_roomother1
listing_roomother2desc
listing_roomother2length
listing_roomother2level
listing_roomother2width
listing_roomother2
listing_roomrecdesc
listing_roomreclength
listing_roomreclevel
listing_roomrecwidth
listing_handicap
listing_yearbuilt
listing_lotdesc
listing_construction
listing_watertype
listing_roof
listing_attic
listing_style
listing_floors
listing_fireplacedesc
listing_structure
listing_walltype
listing_basedesc
listing_appliances
listing_interior
listing_exterior
listing_amenities
listing_pooldesc
listing_fence
listing_porch
listing_heatsrc
listing_heatsystem
listing_coolsystem
listing_waterheater
listing_watersewer
listing_parking
listing_garagedesc
listing_handicapdesc
listing_feedesc
listing_restrictions
listing_terms
listing_assocfeeincludes
listing_building
listing_possession
listing_farmtype
listing_ownerdesc
listing_irrigationsrc
listing_taxyear
listing_taxamount
listing_directions
listing_remarks
listing_virtualtourlink
listing_vowavmyn
listing_vowcommyn
listing_addressdisplayyn
listing_f174
listing_proptype
listing_lat
listing_lon
listing_photo1
listing_listofficename
listing_vtoururl
listing_multiphotoflag
id <- primary key
添加了表格列名稱。從您的查詢,我得到未知的表格mls_cvrmls –
@Andre - 修正了 – Galz
@Andre - 兩者都做家長和孩子都在同一列(所有的)? – Galz