Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.0k views
in Technique[技术] by (71.8m points)

是否支持多个表合并

lj(leftTable, rightTable, matchingCols, [rightMatchingCols])合并的是两个表,我有十几个表,每个表之间只有一列是不同的,如何一次性把所有的表合并在一起,而不是两两合并?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

可以嵌套查询,例如:

t1=table(1..3 as id,1..3 as value1)
t2=table(1..3 as id,1..3 as value2)
t3=table(1..3 as id,1..3 as value3)
lj(lj(t1,t2,`id),t3,`id)

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...