|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
two tables select fieldsSuppose I have two tables A and B
Table A has fields A1, A2, A3, ... A9 Table B has fields B1, B2, B3, ... B9 I want to select all fields in A and only B3 in table B. I dont want to list individual fields for A because they are too many I simply want to use a *. How do I do this? I tried this way but they are not working Select * from A1, B3 from B Select *, B3 from A, B Thanks John Your query will yeild the desired column list but probably not the desired
results, unless you want a Cartesian product. I suspect you want to join the tables: SELECT A.*, B.B3 FROM A JOIN B ON A1 = B1 -- Show quoteHope this helps. Dan Guzman SQL Server MVP <jkma***@gmail.com> wrote in message news:1127598599.423793.238970@g49g2000cwa.googlegroups.com... > Ok I have figured out how to do it > its > select A.*, B.B3 from A, B > |
|||||||||||||||||||||||