Ask a Question related to Microsoft SQL / MS SQL Server, Design and Development.
-
Leon Shaw #1
Look up Tables
Do you relate look-up table in sql server 2000?
Example:
MEMBER TABLE STATE TABLE
MemberID StateID
State State
Would you relate these two table if you only need the state table to serve
as a drop down list of states to compliment the members table? Please
explain.Thank you!
Leon Shaw Guest
-
Tables - do we really need them?
Are tables and using them just for beginners and newbies? Everything i have built in HTML works just fine using tables but i do find it a little... -
SQL tables help
I have a CF calendar application that I want to replicate, so it involves copying one SQL database to another. There are 10 SQL databases that I... -
one or two tables
Hello, I'd like to hear what you think about the following - We have an application (database plus software) that is used as a central... -
XML and Tables
Is it possible to put formatting in the XML-file then? So I can generate the format from my program which makes the XML-file... Or can I solve... -
SQL tables
Hello, I am using php to create a form. I would like that forms information to go into a database. When creating tables where the information that... -
David Portas #2
Re: Look up Tables
In SQL, relationships are defined with a FOREIGN KEY constraint:
CREATE TABLE States (statecode CHAR(2) PRIMARY KEY, statename VARCHAR(20)
NOT NULL UNIQUE)
CREATE TABLE Members (memberid INTEGER PRIMARY KEY, statecode CHAR(2) NOT
NULL FOREIGN KEY REFERENCES States (statecode))
The purpose of defining a foreign key constraint is to maintain Referential> Would you relate these two table if you only need the state table to serve
> as a drop down list of states to compliment the members table? Please
Integrity. In this case the foreign key ensures that members must have a
valid statecode and that each state in the Members (child) table appears in
the States (parent) table.
--
David Portas
------------
Please reply only to the newsgroup
--
David Portas Guest



Reply With Quote

