a.`id`,a.`name`,b.`id`
FROM
table1
a
LEFT
JOIN
`lsb1`
b
ON
FIND_IN_SET(b.`id`,a.`city_id`)
对我有用[0]丢个板砖[0]引用举报管理TOPwwwwb等
级:92523
CREATE TABLE test_exp (id INT,
name varchar(6),
year INT,
other INT
)
INSERT INTO test_exp VALUES(1, '张三', 1991, 1)
INSERT INTO test_exp VALUES(2, '李四', 1992, 3)
INSERT INTO test_exp VALUES(3, '王五', 1993, 5)
INSERT INTO test_exp VALUES(4, '赵六', 1994, 6)
select id, name, year
INTO OUTFILE 'f:/test_exp.txt'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY ''''
LINES TERMINATED BY '\r\n'
FROM test_exp
输出文件内容如下:
1,'张三',1991
2,'李四',1992
3,'王五',1993
4,'赵六',1994
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)