Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

The Database Forum


You are currently viewing our The Database Forum as a guest. Please register to participate.
Login



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?
__________________

Please login or register to view this content. Registration is FREE
!dahan! is offline
Reply With Quote
View Public Profile Visit !dahan!'s homepage!
 
 
Register now for full access!
Old 07-16-2009, 12:23 AM Re: Can I call on table keys as fields??
JeremyMiller's Avatar
WT Moderator

Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
Trades: 0
Forgive my ignorance, but which SQL engine are you using?
__________________
Jeremy Miller

Please login or register to view this content. Registration is FREE
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.32877 seconds with 12 queries