Reply
Can I call on table keys as fields??
Old 07-15-2009, 11:13 PM Can I call on table keys as fields??
!dahan!'s Avatar
Average Talker

Posts: 20
Trades: 0
I have queries that join several tables. Instead of having to know the specific PRIMARY keys for each table, is there a way i can reference them and the SQL server will know what I want?

Example:
PHP Code:
SELECT tld.PRIMARY as index, tld.id as id, rcx.user as user FROM...

Is there something I could use in place of 'tld.PRIMARY' that would make the database understand I want to use whatever that table has for a PRIMARY key?
__________________
shoes in china
!dahan! is offline
Reply With Quote
View Public Profile Visit !dahan!'s homepage!
 
 
When You Register, These Ads Go Away!
Old 07-16-2009, 12:23 AM Re: Can I call on table keys as fields??
JeremyMiller's Avatar
Full-Time TeraTasker

Posts: 1,470
Name: Jeremy Miller
Location: Marianna, FL
Trades: 0
Forgive my ignorance, but which SQL engine are you using?
__________________
Jeremy Miller - TeraTask
Content Farmer - Automated Posting for Content & Blog Sites
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Reply     « Reply to Can I call on table keys as fields??
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 



Page generated in 0.80939 seconds with 13 queries