SQL多重嵌套查询和别名
我有多个嵌套查询,需要添加别名。我怎么做 这是一个例子:SQL多重嵌套查询和别名,sql,subquery,alias,Sql,Subquery,Alias,我有多个嵌套查询,需要添加别名。我怎么做 这是一个例子: Select * from table where Value IN ( Select Value1 from table where Value IN ( Select Value2 from table where Value IN ( Select Value3 from table where A = B))) 我需要将所有优先选择和所有值* 我该怎么做?可能使用别名?此查询具有相同的输出。如果你正在寻找另一个结果,
Select * from table where Value IN (
Select Value1 from table where Value IN (
Select Value2 from table where Value IN (
Select Value3 from table where A = B)))
我需要将所有优先选择和所有值*
我该怎么做?可能使用别名?此查询具有相同的输出。如果你正在寻找另一个结果,请解释更多
Select * from table where A = B and Value =Value1 and Value1 =Value2 and Value2 =Value3
(1) 格式化查询,使其可读。(2) 添加示例数据和所需结果,这样您的问题才有意义。您的表结构是什么?我有很多表,我不能发布db表。我需要进行嵌套查询,只显示每个子查询的一些结果,每个表包含10个以上的值。我在db中有6个以上的表