相同列,相同表 - 查询 [英] Same Column, Same Table - Query

查看:82
本文介绍了相同列,相同表 - 查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

美好的一天。



示例数据库:


table1


col1 col2 col3

A item1 100

A item2 200

A item3 300

B item1 400

B item2 500

B item3 600


############### ##################

查询结果:


col1 col2 col3 col4 col5

item1 A 100 B 400

item2 A 200 B 500

item3 A 300 B 600


>
可以用这个结果进行查询。


谢谢。

good day.


sample database:

table1

col1 col2 col3
A item1 100
A item2 200
A item3 300
B item1 400
B item2 500
B item3 600


#################################

query result:

col1 col2 col3 col4 col5
item1 A 100 B 400
item2 A 200 B 500
item3 A 300 B 600


is this possible to do a query with this result.

thank you.

推荐答案

Glennyboy,


这是一个SQL Server问题还是HTML问题?

您使用什么技术来实现您的解决方案?


你想做什么?
Glennyboy,

Is this a SQL Server question or an HTML question?
What technology are you using to implement your solution?

What are you trying to do?


是的可以从Sql获得。但是,您需要使用以下脚本之一来获取sql的结果。


PHP,ASP.NET,JSP
Yes It is possible getting from Sql. But, you need have use one of the script below to get result from sql.

PHP, ASP.NET, JSP


Frinavale,


谢谢你的回复。


- 这是用于MS SQL Server。

- 我使用的是SQL Server Management Studio Express测试sql查询,然后我将在MS Excel中使用它将数据从sql server导出到MS Excel。
Frinavale,

thank you for the reply.

- This is for MS SQL Server.
- Im using SQL Server Management Studio Express to test the sql query, then i will use it in MS Excel to export data from sql server to MS Excel.


这篇关于相同列,相同表 - 查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆