Click here to Skip to main content
15,888,733 members
Home / Discussions / Database
   

Database

 
AnswerRe: Would an index make this query faster? Pin
Shameel27-Jan-14 22:43
professionalShameel27-Jan-14 22:43 
GeneralRe: Would an index make this query faster? Pin
khun_panya29-Jan-14 6:23
khun_panya29-Jan-14 6:23 
AnswerRe: Would an index make this query faster? Pin
GuyThiebaut28-Jan-14 3:32
professionalGuyThiebaut28-Jan-14 3:32 
GeneralRe: Would an index make this query faster? Pin
Jörgen Andersson28-Jan-14 9:11
professionalJörgen Andersson28-Jan-14 9:11 
QuestionAnalyser index recommendations Pin
vkEE27-Jan-14 8:32
vkEE27-Jan-14 8:32 
AnswerRe: Analyser index recommendations Pin
Mycroft Holmes27-Jan-14 12:04
professionalMycroft Holmes27-Jan-14 12:04 
AnswerRe: Analyser index recommendations Pin
Shameel27-Jan-14 22:31
professionalShameel27-Jan-14 22:31 
QuestionConditional SQL commands: Good? Bad? Pin
Gregory Gadow27-Jan-14 5:10
Gregory Gadow27-Jan-14 5:10 
I've been at this for more than 15 years, and I'm still learning stuff. Most recently, it has been conditional commands in SQL. By way of example:
SQL
IF EXISTS (SELECT * FROM Inventory WHERE ProductId=@ProductId)
    UPDATE Inventory SET Price=@Price, Count=@Count
ELSE
    INSERT Inventory (ProductId, Price, Count) VALUES (@ProductId, @Price, @Count)
I would think this is more efficient than putting the if...else in the application, and it would let me move a lot of code to SQL Server as stored procedures. But before I go hog wild, I wanted to hear from other programmers on whether this is Good Design or something that should be avoided.
AnswerRe: Conditional SQL commands: Good? Bad? Pin
Richard Deeming27-Jan-14 5:21
mveRichard Deeming27-Jan-14 5:21 
GeneralRe: Conditional SQL commands: Good? Bad? Pin
Eddy Vluggen28-Jan-14 3:21
professionalEddy Vluggen28-Jan-14 3:21 
AnswerRe: Conditional SQL commands: Good? Bad? Pin
Jörgen Andersson27-Jan-14 5:29
professionalJörgen Andersson27-Jan-14 5:29 
AnswerRe: Conditional SQL commands: Good? Bad? Pin
Kornfeld Eliyahu Peter27-Jan-14 8:07
professionalKornfeld Eliyahu Peter27-Jan-14 8:07 
AnswerRe: Conditional SQL commands: Good? Bad? Pin
Gregory Gadow27-Jan-14 10:03
Gregory Gadow27-Jan-14 10:03 
AnswerRe: Conditional SQL commands: Good? Bad? Pin
Mycroft Holmes27-Jan-14 12:00
professionalMycroft Holmes27-Jan-14 12:00 
GeneralRe: Conditional SQL commands: Good? Bad? Pin
Kornfeld Eliyahu Peter27-Jan-14 20:45
professionalKornfeld Eliyahu Peter27-Jan-14 20:45 
GeneralRe: Conditional SQL commands: Good? Bad? Pin
Mycroft Holmes27-Jan-14 20:57
professionalMycroft Holmes27-Jan-14 20:57 
GeneralRe: Conditional SQL commands: Good? Bad? Pin
Kornfeld Eliyahu Peter27-Jan-14 21:02
professionalKornfeld Eliyahu Peter27-Jan-14 21:02 
GeneralRe: Conditional SQL commands: Good? Bad? Pin
Mycroft Holmes27-Jan-14 21:06
professionalMycroft Holmes27-Jan-14 21:06 
GeneralRe: Conditional SQL commands: Good? Bad? Pin
Kornfeld Eliyahu Peter28-Jan-14 23:28
professionalKornfeld Eliyahu Peter28-Jan-14 23:28 
GeneralRe: Conditional SQL commands: Good? Bad? Pin
Jörgen Andersson27-Jan-14 23:10
professionalJörgen Andersson27-Jan-14 23:10 
GeneralRe: Conditional SQL commands: Good? Bad? Pin
Richard Deeming28-Jan-14 1:34
mveRichard Deeming28-Jan-14 1:34 
GeneralRe: Conditional SQL commands: Good? Bad? Pin
Jörgen Andersson28-Jan-14 2:32
professionalJörgen Andersson28-Jan-14 2:32 
AnswerRe: Conditional SQL commands: Good? Bad? Pin
Shameel27-Jan-14 22:39
professionalShameel27-Jan-14 22:39 
AnswerRe: Conditional SQL commands: Good? Bad? Pin
jschell28-Jan-14 10:40
jschell28-Jan-14 10:40 
QuestionDatabase Design Tools? Pin
Code_Crash26-Jan-14 21:41
Code_Crash26-Jan-14 21:41 

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.