背景:
有一个数据表,适用原始查询就能查到数据
select *
from t_easy_barcode
where FP01 = 'panel_jitaix32_2024_04_25_10_29_57'
当我把表中数据列重命名之后sql如下:
因此 我先统计了一下数据表中数据有多少,查询发现有 2482872条
因此首先想到的问题是查询一下表结构,语句如下:
SELECT
A.name AS table_name,
B.name AS column_name,
C.value AS column_description
FROM sys.tables A
INNER JOIN sys.columns B ON B.object_id = A.object_id
LEFT JOIN sys.extended_properties C ON C.major_id = B.object_id AND C.minor_id = B.column_id
WHERE A.name = &