Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How do I place the value of another field in a field :)
Frank_Blacks_Pixie_at_hotmail.com (-Pixie) wrote in news:a5f80d54.0209090633.63fdcb10_at_posting.google.com:
> Hi. Im a newbie to Oracle & so this question may seem simple to
> you all :) Im trying to teach myself Oracle whilst at the same
> time create a singles website :)
We all gotta learn somewhere ... :)
> For the moment Im just trying to understand how I can connect two
> tables via one field. When a client fills out a new member form in
> asp, I would like the data to be divided between two seperate
> tables.
>
> I would like to create two simple tables.
>
> Table T1 would contain three fields: fname, lname and mem_id.
> mem_id would be the primary key field not null which auto
> increments. fname and lname would be alphanuemeric fields not
> null.
>
> Table T2 would contain three fields as well: username, password
> and mem_id. username would be alphanumeric not null starting with
> a letter and not a number. password would be alphanumerica not
> null minimum 6 characters, and mem_id would be the primary key but
> that it should obtain its value from table T1's mem_id field.
>
> I would really appreciate it if anyone could give me an example of
> how to do this in sqlplus :)
>
> At the risk of sounding foolish, Ive been trying to do this for
> over a week :/ Any help would be greatly appreciated!!
Hey Pixie,
Is this what you're after?
select * from t1, t2 where t1.mem_id = t2.mem_id /
it's a bit too easy so I'm not sure if I've understood your question correctly. :)
-- Pablo Sanchez, High-Performance Database Engineering http://www.hpdbe.comReceived on Mon Sep 09 2002 - 09:52:20 CDT