-- ====================================
-- 检查xq_client_log表的实际结构
-- ====================================

-- 1. 检查xq_client_log表的所有字段
SELECT 
    COLUMN_NAME as '字段名',
    DATA_TYPE as '数据类型',
    CHARACTER_MAXIMUM_LENGTH as '字符最大长度',
    IS_NULLABLE as '是否可空',
    COLUMN_DEFAULT as '默认值',
    COLUMN_TYPE as '完整类型'
FROM INFORMATION_SCHEMA.COLUMNS 
WHERE TABLE_SCHEMA = DATABASE() 
AND TABLE_NAME = 'xq_client_log'
ORDER BY ORDINAL_POSITION;

-- 2. 检查表的创建语句
SHOW CREATE TABLE xq_client_log;

-- 3. 检查是否有其他类似的字段名
SELECT 
    COLUMN_NAME as '字段名',
    COLUMN_TYPE as '完整类型'
FROM INFORMATION_SCHEMA.COLUMNS 
WHERE TABLE_SCHEMA = DATABASE() 
AND TABLE_NAME = 'xq_client_log'
AND (
    COLUMN_NAME LIKE '%server%' OR
    COLUMN_NAME LIKE '%device%' OR
    COLUMN_NAME LIKE '%id%'
)
ORDER BY ORDINAL_POSITION;
