Click here to Skip to main content
15,887,214 members
Home / Discussions / Database
   

Database

 
AnswerRe: How to convert Physical XML files into Sqlserver Tables? Pin
Eddy Vluggen10-Aug-12 23:52
professionalEddy Vluggen10-Aug-12 23:52 
QuestionHow do you use the AVG api in sql to manage grouped output? Pin
Xarzu10-Aug-12 13:04
Xarzu10-Aug-12 13:04 
AnswerRe: How do you use the AVG api in sql to manage grouped output? Pin
Paul Conrad10-Aug-12 20:18
professionalPaul Conrad10-Aug-12 20:18 
GeneralRe: How do you use the AVG api in sql to manage grouped output? Pin
Xarzu11-Aug-12 13:30
Xarzu11-Aug-12 13:30 
AnswerRe: How do you use the AVG api in sql to manage grouped output? Pin
Paul Conrad11-Aug-12 13:32
professionalPaul Conrad11-Aug-12 13:32 
AnswerRe: How do you use the AVG api in sql to manage grouped output? Pin
Eddy Vluggen10-Aug-12 22:17
professionalEddy Vluggen10-Aug-12 22:17 
AnswerRe: How do you use the AVG api in sql to manage grouped output? Pin
Niladri_Biswas21-Aug-12 22:51
Niladri_Biswas21-Aug-12 22:51 
QuestionHow to store a standard selection? Pin
Jörgen Andersson10-Aug-12 9:57
professionalJörgen Andersson10-Aug-12 9:57 
I have a question that's more of the hypothetical kind.

I have two tables:

Users
useridusername
1John Doe
2Jane Doe



email
useridemail
1john.doe@myworkmail.com
1john.doe@myprivatemail.net
1john.doe@someothermail.org
2jane.doe@myworkmail.com
2jane.doe@myprivatemail.net
2jane.doe@someothermail.org


Now I'd like to make one (or zero) email address per user the default address.

On an ANSI compliant system I could simply add a nullable column to the email table and add a check so that the value can only be 'DEFAULT' or null and add a unique composite key on this column and the userid column.
This would of course not work on certain databases that don't allow more than one null value when having a unique key.

So what other solutions are there? Preferrably not allowing null values.
Light moves faster than sound. That is why some people appear bright, until you hear them speak.
List of common misconceptions

AnswerRe: How to store a standard selection? Pin
R. Giskard Reventlov10-Aug-12 10:02
R. Giskard Reventlov10-Aug-12 10:02 
GeneralRe: How to store a standard selection? Pin
Jörgen Andersson10-Aug-12 10:09
professionalJörgen Andersson10-Aug-12 10:09 
GeneralRe: How to store a standard selection? Pin
R. Giskard Reventlov10-Aug-12 10:41
R. Giskard Reventlov10-Aug-12 10:41 
AnswerRe: How to store a standard selection? Pin
Eddy Vluggen10-Aug-12 10:11
professionalEddy Vluggen10-Aug-12 10:11 
GeneralRe: How to store a standard selection? Pin
Jörgen Andersson10-Aug-12 10:31
professionalJörgen Andersson10-Aug-12 10:31 
QuestionDatabase status check and report Pin
leketekoa10-Aug-12 4:12
leketekoa10-Aug-12 4:12 
AnswerRe: Database status check and report Pin
David Mujica10-Aug-12 5:10
David Mujica10-Aug-12 5:10 
GeneralRe: Database status check and report Pin
leketekoa13-Aug-12 4:30
leketekoa13-Aug-12 4:30 
AnswerRe: Database status check and report Pin
jschell10-Aug-12 12:46
jschell10-Aug-12 12:46 
QuestionSymantec Q&A File Conversion Pin
snowman539-Aug-12 12:54
snowman539-Aug-12 12:54 
AnswerRe: Symantec Q&A File Conversion Pin
Eddy Vluggen9-Aug-12 22:21
professionalEddy Vluggen9-Aug-12 22:21 
GeneralRe: Symantec Q&A File Conversion Pin
snowman5310-Aug-12 11:51
snowman5310-Aug-12 11:51 
GeneralRe: Symantec Q&A File Conversion Pin
Eddy Vluggen10-Aug-12 22:13
professionalEddy Vluggen10-Aug-12 22:13 
AnswerRe: Symantec Q&A File Conversion Pin
Mycroft Holmes12-Aug-12 18:18
professionalMycroft Holmes12-Aug-12 18:18 
GeneralRe: Symantec Q&A File Conversion Pin
snowman5313-Aug-12 6:36
snowman5313-Aug-12 6:36 
QuestionUsername/password protected database Pin
Kujtim Hyseni7-Aug-12 10:10
Kujtim Hyseni7-Aug-12 10:10 
AnswerRe: Username/password protected database Pin
Mycroft Holmes7-Aug-12 12:49
professionalMycroft Holmes7-Aug-12 12:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.