i have The tables the same structure
for Example
table 1
code name
100 ahmed
101 ali
table 2
code name
200 sayd
201 mohsen
And I need to query the result can be
code name
100 ahmed
101 ali
200 sayd
201 mohsen
How do I do this by sql statment
Printable View
i have The tables the same structure
for Example
table 1
code name
100 ahmed
101 ali
table 2
code name
200 sayd
201 mohsen
And I need to query the result can be
code name
100 ahmed
101 ali
200 sayd
201 mohsen
How do I do this by sql statment
Use a Union, eg:
Code:SELECT code, name FROM table1
UNION ALL
SELECT code, name FROM table2