我在 SQL Server 数据库中有几列,如下所示:
Column1 Column2
Item1 <div id="html"><img.............>5424</div>
Item2 <div id="html"><img.............>3424</div>
Item3 <div id="html"><img.............>8424</div>
Item4 <div id="html"><img.............>6424</div>
我想根据内部的值使用 ORDER BY 对它们重新排序>*</div>
,以便输出如下所示:
Column1 Column2
Item2 <div id="html"><img.............>3424</div>
Item1 <div id="html"><img.............>5424</div>
Item4 <div id="html"><img.............>6424</div>
Item3 <div id="html"><img.............>8424</div>
我正在使用以下代码从数据库中提取值:
SELECT
Table1_1.F1 AS Column1, Table2_1.1PrisHTML AS Column2
FROM
Table2 AS Table2_1
CROSS JOIN
Table1 AS Table1_1
UNION ALL
SELECT
Table1_1.L1, Table2_1.2PrisHTML
FROM
Table2 AS Table2_1
CROSS JOIN
Table1 AS Table1_1
UNION ALL
SELECT
Table1_1.M1, Table2_1.3PrisHTML
FROM
Table2 AS Table2_1
CROSS JOIN
Table1 AS Table1_1
UNION ALL
SELECT
Table1_1.T1, Table2_1.4PrisHTML
FROM
Table2 AS Table2_1
CROSS JOIN
Table1 AS Table1_1
有人有什么建议吗?
编辑:
我确实在单独的列中有值,称为Column3
可用于排序的列。但我不想显示此列。有什么建议么?