开发者

Can I ignore rows when Loading Data Into a table?

开发者 https://www.devze.com 2023-03-11 14:14 出处:网络
LOAD XML LOCAL INF开发者_StackOverflow社区ILE \'c:/users/ryan/desktop/2.xml\' REPLACE INTO TABLE product
LOAD XML LOCAL INF开发者_StackOverflow社区ILE 'c:/users/ryan/desktop/2.xml'
REPLACE INTO TABLE product
ROWS IDENTIFIED BY '<product>'

I want to only update 2 rows based on my XML file. Can I ignore specific rows of the table?


You can ignore specified number of first rows, e.g. - 'IGNORE 10 LINES'; otherwise, load all rows into another table, then write UPDATE or INSERT...SELECT query to change rows you need (there should be keys to specify these rows).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号