Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Hi I am having a table T1 with 3 fields F1,F2 and F3.I am having another table T2 With field names F4,F5,F6.These 2 tables are having a common field X for relationshipWhen i retrieve some data from table T2, I need the field name should display the data tat entered in the T1
visakh16
Very Important crosS Applying yaK Herder
52326 Posts
Posted - 2008-12-30 : 01:00:52
just do
SELECT T1.X AS T1X,T1.F1,T1.F2,T1.F3,T2.X AS T2X,T2.F4,T2.F5,T2.F6FROM T1 JOIN T2ON T2.X=T1.X