Jump to content

Simple SQL syntax request


JansenDK

Recommended Posts

Hi all

 

So, im looking for a simple SQL syntax that does following;

 

Determines what subject an article is about. (food, health for axample)

 

I've build 2 entities, one called artikler, and one called emne.

 

http://img163.imageshack.us/img163/3321/illustration.png

 

Now, id like the foreign key from artikler, to refer to the entity emne, so that it can tell what subject that article is.

 

(NOTE, its in danish = entity emne = mad/food and sundhed/health)

FK is foreign key.

 

Any ideas for a SQL syntax?

Link to comment
Share on other sites

Well almost nothing :) Im brand new to SQL.

 

So, what I got so far is;

 

SELECT emne

FROM artikel

 

Im guessing that thats not enough to make any code or action work.

 

Id like the foreign key to fetch the subject of the article. However I dont know how to!

 

http://img96.imageshack.us/img96/4250/illustrationo.png

 

It might be easier to see the relation between foreign key and the primary key of emne.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.