|
-
Oct 16th, 2012, 02:21 AM
#1
Thread Starter
Addicted Member
How to make the select statement in MS sql?
I am developing windows application using C# and MS sql.
I have the following tables.
table1
pkid Name
101 Meles
102 Zenawi
103 Mekele
104 Kenenisa
table2
pkid2 datepaid PKid
10 13/3/2012 101
11 16/4/2012 101
12 25/9/2012 101
13 14/9/2012 102
14 27/9/2012 102
15 15/10/2012 102
now i want to select name from the first table table1 and the latest datepaid from the second table table2. both table is connected by foreign key(from table1 into table2.. PKid)
i expect the resutlt to be
Name datepaid
Meles 25/9/2012
Zenawi 15/10/2012
how do i make the select statement please help me?
thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|