Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

can we set relation with in columns in a table in sql

Status
Not open for further replies.

helloaspnet

Programmer
May 31, 2007
37
US
Hi
Suppose in a table there are two columns a and b ,is it possible to set so that b value always depends on a i.e if a is made 2 then b should be a multiple like 4 or anything
plz help me out

helloaspnet
 
Yes. You can do this in a variety of ways using either ASP.NET or even doing it in SQL, whichever you prefer.

------------------------------------------------------------------------------------------------------------------------
"Men occasionally stumble over the truth, but most of them pick themselves up and hurry off as if nothing ever happened."
- Winston Churchill
 
Do you any SQL statement you have written for this? In order to get a clear and exact answer for your problem please post either your asp.net code or For your sql statement post it in SQL forum.
 
It sounds more like computed columns. But are you asking help for SQL table, or .NET DataTable? Whichever, try posting on appropriate forums to get more precise answers, or just key in "computed columns" in the Search box on these forums:
SQL -> forum183
General C# and Winforms -> forum732
VB.NET -> forum796
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top