结合2个表没有关系

编程入门 行业动态 更新时间:2024-10-24 10:22:20
本文介绍了结合2个表没有关系的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想要结合两个表,我之间没有任何关系。我想检查mod(row_no,discount_number)= 0,我将用discount_amount_percentage用gross_amount和tax_amount.how来计算吗?。如果有的话是关系意味着我们可以使用连接但没有关系 // table1 row_no gross_amount tax_amount // table2 discount_amount_percentage discount_number

i want to combine both tables and I dnt have any relation between them.i want to check if mod(row_no,discount_number)=0 and i will calculate with discount_amount_percentage with gross_amount and tax_amount.how to do this?.If there is relationship means we can use joins but there is no relationship //table1 row_no gross_amount tax_amount //table2 discount_amount_percentage discount_number

推荐答案

您可以在下方使用查询 You can use below query Select * from table1 t1, table2 t2 where --....some condition here

代替*,你可以用case来获取你的结果。

at place of *, you can use "case" for getting the your result.

更多推荐

结合2个表没有关系

本文发布于:2023-10-28 18:27:49,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1537423.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:关系

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!