query..
-
i want the SQL query for getting single column from two different tables column.... i have two tables...vendor and labour, In that Vendor_Name and Labour_name columns.. i want all names in one single column... Thnks....
Vishal V Patil (M. C. A.)
-
i want the SQL query for getting single column from two different tables column.... i have two tables...vendor and labour, In that Vendor_Name and Labour_name columns.. i want all names in one single column... Thnks....
Vishal V Patil (M. C. A.)
Do some reading around the
UNION
keyword.Select Vendor_Name from Vendor
UNION
Select Labour_Name from LabourNever underestimate the power of human stupidity RAH
-
Do some reading around the
UNION
keyword.Select Vendor_Name from Vendor
UNION
Select Labour_Name from LabourNever underestimate the power of human stupidity RAH
Thnks for rply....but, It will show last two records from both two tables....
Vishal V Patil (M. C. A.)
-
Thnks for rply....but, It will show last two records from both two tables....
Vishal V Patil (M. C. A.)
select * from vendor where id in (select top 2 id from vendor order by id desc)
union all
select * from labour where id in (select top 2 id from labour order by id desc)
I Love T-SQL "VB.NET is developed with C#.NET" If my post helps you kindly save my time by voting my post.