以下是我的主表:
tablename columnname size order
employee name 25 1
employee sex 25 2
employee contactNumber 50 3
employee salary 25 4
address street 25 5
address country 25 6
以下是我的子表:
childid userid masterid isactive size order
1 1 1 Y 25 1
2 1 2 Y 25 2
3 1 3 N 0 0
4 1 4 Y 50 3
我想从主表和大小中获取表名列名,isactive is Y
在子表中针对用户 ID 订购子表。
有时,如果特定用户的值不存在,则获取所有值,例如表名、列名、大小、顺序where isactive is
Y
我真的很抱歉问这个问题,但我不擅长 SQL。
问候。