Click here to Skip to main content
14,495,596 members
   

Database

 
AnswerRe: Copying the Headers of Result Set of Select statement Pin
Mycroft Holmes24-Apr-18 12:53
professionalMycroft Holmes24-Apr-18 12:53 
GeneralRe: Copying the Headers of Result Set of Select statement Pin
indian14324-Apr-18 14:09
Memberindian14324-Apr-18 14:09 
GeneralRe: Copying the Headers of Result Set of Select statement Pin
Mycroft Holmes24-Apr-18 14:32
professionalMycroft Holmes24-Apr-18 14:32 
GeneralRe: Copying the Headers of Result Set of Select statement Pin
indian14325-Apr-18 9:48
Memberindian14325-Apr-18 9:48 
QuestionNaming my clustered index column which isn't the PK (and is a non-PK clustered Identity a good idea?) Pin
JChrisCompton20-Apr-18 11:55
MemberJChrisCompton20-Apr-18 11:55 
AnswerRe: Naming my clustered index column which isn't the PK (and is a non-PK clustered Identity a good idea?) Pin
Victor Nijegorodov21-Apr-18 3:34
MemberVictor Nijegorodov21-Apr-18 3:34 
GeneralRe: Naming my clustered index column which isn't the PK (and is a non-PK clustered Identity a good idea?) Pin
JChrisCompton23-Apr-18 3:00
MemberJChrisCompton23-Apr-18 3:00 
AnswerRe: Naming my clustered index column which isn't the PK (and is a non-PK clustered Identity a good idea?) Pin
Eddy Vluggen23-Apr-18 5:19
professionalEddy Vluggen23-Apr-18 5:19 
JChrisCompton wrote:
2. I have the identity starting at -1 and decreasing by 1 to make it obvious that it isn't the pk.
Don't know how much this will help, but I do what I can.
If it is your table, you decide what the PK is. The vendors ID should simply be a unique constraint with an index and be treated as an "alternative primary key".

JChrisCompton wrote:
3. I don't like the names ix_need_a_good_name_here, need_a_good_name_here_ix, need_a_good_name_here_id, because if I saw them I would assume that was the primary key. Suggestions?
The name should be identifying enough for you to know which constraint has been broken once the exception is thrown. To make searching easier, I use the tablename as the beginning of that name, and postfix the columname on which the constraint lies, as well as the letters "IX" for an index, or "C" for a constraint.
Bastard Programmer from Hell Suspicious | :suss:
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.

AnswerRe: Naming my clustered index column which isn't the PK (and is a non-PK clustered Identity a good idea?) Pin
Jörgen Andersson23-Apr-18 21:58
professionalJörgen Andersson23-Apr-18 21:58 
GeneralRe: Naming my clustered index column which isn't the PK (and is a non-PK clustered Identity a good idea?) Pin
JChrisCompton24-Apr-18 11:21
MemberJChrisCompton24-Apr-18 11:21 
GeneralRe: Naming my clustered index column which isn't the PK (and is a non-PK clustered Identity a good idea?) Pin
Eddy Vluggen25-Apr-18 0:41
professionalEddy Vluggen25-Apr-18 0:41 
GeneralRe: Naming my clustered index column which isn't the PK (and is a non-PK clustered Identity a good idea?) Pin
JChrisCompton25-Apr-18 4:40
MemberJChrisCompton25-Apr-18 4:40 
GeneralRe: Naming my clustered index column which isn't the PK (and is a non-PK clustered Identity a good idea?) Pin
Eddy Vluggen25-Apr-18 5:33
professionalEddy Vluggen25-Apr-18 5:33 
GeneralRe: Naming my clustered index column which isn't the PK (and is a non-PK clustered Identity a good idea?) Pin
JChrisCompton30-Apr-18 5:30
MemberJChrisCompton30-Apr-18 5:30 
GeneralRe: Naming my clustered index column which isn't the PK (and is a non-PK clustered Identity a good idea?) Pin
Eddy Vluggen30-Apr-18 5:58
professionalEddy Vluggen30-Apr-18 5:58 
GeneralRe: Naming my clustered index column which isn't the PK (and is a non-PK clustered Identity a good idea?) Pin
JChrisCompton30-Apr-18 7:35
MemberJChrisCompton30-Apr-18 7:35 
GeneralRe: Naming my clustered index column which isn't the PK (and is a non-PK clustered Identity a good idea?) Pin
Eddy Vluggen30-Apr-18 8:13
professionalEddy Vluggen30-Apr-18 8:13 
GeneralRe: Naming my clustered index column which isn't the PK (and is a non-PK clustered Identity a good idea?) Pin
Jörgen Andersson25-Apr-18 2:15
professionalJörgen Andersson25-Apr-18 2:15 
GeneralRe: Naming my clustered index column which isn't the PK (and is a non-PK clustered Identity a good idea?) Pin
JChrisCompton25-Apr-18 5:47
MemberJChrisCompton25-Apr-18 5:47 
GeneralRe: Naming my clustered index column which isn't the PK (and is a non-PK clustered Identity a good idea?) Pin
Jörgen Andersson25-Apr-18 10:49
professionalJörgen Andersson25-Apr-18 10:49 
PraiseRe: Naming my clustered index column which isn't the PK (and is a non-PK clustered Identity a good idea?) Pin
JChrisCompton26-Apr-18 4:17
MemberJChrisCompton26-Apr-18 4:17 
QuestionEXCEPTIONS INTO Equivalent for SQL Server Pin
Member 1208387120-Apr-18 4:59
MemberMember 1208387120-Apr-18 4:59 
AnswerRe: EXCEPTIONS INTO Equivalent for SQL Server Pin
Eddy Vluggen23-Apr-18 5:21
professionalEddy Vluggen23-Apr-18 5:21 
GeneralRe: EXCEPTIONS INTO Equivalent for SQL Server Pin
Member 1208387123-Apr-18 5:24
MemberMember 1208387123-Apr-18 5:24 
Questionhow to access temp table field in subquery? Pin
joost.versteegen11-Apr-18 21:43
Memberjoost.versteegen11-Apr-18 21:43 

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.