wuzhen 提交代码
This commit is contained in:
1 parent
913e542e7c
commit
6820ebc45f
97 files changed
+27269
-1
No files matched your search
@@ -0,0 +1,43 @@
|
||||
-- 检查xg_student_info表的实际结构
|
||||
-- 用于确认哪些字段存在于数据库中
|
||||
|
||||
USE hzdyjs_xg;
|
||||
|
||||
-- 显示表结构
|
||||
DESCRIBE xg_student_info;
|
||||
|
||||
-- 显示所有字段名
|
||||
SELECT COLUMN_NAME, DATA_TYPE, IS_NULLABLE, COLUMN_DEFAULT, COLUMN_COMMENT
|
||||
FROM information_schema.COLUMNS
|
||||
WHERE table_schema = 'hzdyjs_xg'
|
||||
AND table_name = 'xg_student_info'
|
||||
ORDER BY ORDINAL_POSITION;
|
||||
|
||||
-- 检查特定字段是否存在
|
||||
SELECT
|
||||
CASE WHEN COUNT(*) > 0 THEN 'EXISTS' ELSE 'NOT EXISTS' END as nation_status
|
||||
FROM information_schema.COLUMNS
|
||||
WHERE table_schema = 'hzdyjs_xg'
|
||||
AND table_name = 'xg_student_info'
|
||||
AND column_name = 'nation';
|
||||
|
||||
SELECT
|
||||
CASE WHEN COUNT(*) > 0 THEN 'EXISTS' ELSE 'NOT EXISTS' END as name_english_status
|
||||
FROM information_schema.COLUMNS
|
||||
WHERE table_schema = 'hzdyjs_xg'
|
||||
AND table_name = 'xg_student_info'
|
||||
AND column_name = 'name_english';
|
||||
|
||||
SELECT
|
||||
CASE WHEN COUNT(*) > 0 THEN 'EXISTS' ELSE 'NOT EXISTS' END as phone_status
|
||||
FROM information_schema.COLUMNS
|
||||
WHERE table_schema = 'hzdyjs_xg'
|
||||
AND table_name = 'xg_student_info'
|
||||
AND column_name = 'phone';
|
||||
|
||||
SELECT
|
||||
CASE WHEN COUNT(*) > 0 THEN 'EXISTS' ELSE 'NOT EXISTS' END as mobile_status
|
||||
FROM information_schema.COLUMNS
|
||||
WHERE table_schema = 'hzdyjs_xg'
|
||||
AND table_name = 'xg_student_info'
|
||||
AND column_name = 'mobile';
|
||||
Reference in new issue
Block a user