ASP Free Lounge
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsOtherASP Free Lounge

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old February 2nd, 2007, 07:36 AM
sivaramanrajesh's Avatar
sivaramanrajesh sivaramanrajesh is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Location: http://USA/New Jersey/Parsippany/Novartis-East-Hanover.aspx
Posts: 366 sivaramanrajesh User rank is First Lieutenant (10000 - 20000 Reputation Level)sivaramanrajesh User rank is First Lieutenant (10000 - 20000 Reputation Level)sivaramanrajesh User rank is First Lieutenant (10000 - 20000 Reputation Level)sivaramanrajesh User rank is First Lieutenant (10000 - 20000 Reputation Level)sivaramanrajesh User rank is First Lieutenant (10000 - 20000 Reputation Level)sivaramanrajesh User rank is First Lieutenant (10000 - 20000 Reputation Level)sivaramanrajesh User rank is First Lieutenant (10000 - 20000 Reputation Level)sivaramanrajesh User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Week 2 Days 10 h 42 m 27 sec
Reputation Power: 159
Smile How do you people use a DELETE statement in SQL Server?

Hiya All,

Since I started using SQL Server I write like this

DELETE tblSomeTableName WHERE ID = @someID

But in this new project they are saying,
I have to include "FROM" in the query, like this

DELETE FROM tblSomeTableName WHERE ID = @someID

So I asked what is the advantage and what is the disadvantage of
my query. No answers from them

Please comment.

Rajesh Sivaraman.

Reply With Quote
  #2  
Old February 2nd, 2007, 07:49 AM
nofriends's Avatar
nofriends nofriends is offline
Senior Water Wizard
ASP Free God 11th Plane (10000 - 10499 posts)
 
Join Date: Aug 2004
Location: Cape Town, RSA
Posts: 10,186 nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)  Folding Points: 112786 Folding Title: Super Ultimate Folder - Level 1Folding Points: 112786 Folding Title: Super Ultimate Folder - Level 1Folding Points: 112786 Folding Title: Super Ultimate Folder - Level 1Folding Points: 112786 Folding Title: Super Ultimate Folder - Level 1Folding Points: 112786 Folding Title: Super Ultimate Folder - Level 1Folding Points: 112786 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 3 Months 2 Weeks 2 Days 7 h 36 m 24 sec
Reputation Power: 699
well, I have always used Delete From
not sure about the difference
__________________
Look! Its a ShemZilla



Reply With Quote
  #3  
Old February 2nd, 2007, 07:58 AM
tctekkie's Avatar
tctekkie tctekkie is offline
Wizardess of Free Spirits
ASP Free Frequenter (2500 - 2999 posts)
 
Join Date: Dec 2004
Location: Michigan
Posts: 2,558 tctekkie User rank is Major (30000 - 40000 Reputation Level)tctekkie User rank is Major (30000 - 40000 Reputation Level)tctekkie User rank is Major (30000 - 40000 Reputation Level)tctekkie User rank is Major (30000 - 40000 Reputation Level)tctekkie User rank is Major (30000 - 40000 Reputation Level)tctekkie User rank is Major (30000 - 40000 Reputation Level)tctekkie User rank is Major (30000 - 40000 Reputation Level)tctekkie User rank is Major (30000 - 40000 Reputation Level)tctekkie User rank is Major (30000 - 40000 Reputation Level)tctekkie User rank is Major (30000 - 40000 Reputation Level)  Folding Points: 13303 Folding Title: Novice Folder
Time spent in forums: 1 Month 2 Days 18 h 29 m 41 sec
Reputation Power: 389
Same here... Always Delete FROM
__________________
If I've helped you then add to my rep please... Click on the !

Got Milk??


Reply With Quote
  #4  
Old February 2nd, 2007, 11:00 AM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
ASP Free God 46th Plane (27500 - 27999 posts)
 
Join Date: Sep 2004
Location: Israel
Posts: 27,946 Shadow Wizard User rank is General 15th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 15th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 15th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 15th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 15th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 15th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 15th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 15th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 15th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 15th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 15th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 15th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 15th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 15th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 15th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 15th Grade (Above 100000 Reputation Level)  Folding Points: 392772 Folding Title: Super Ultimate Folder - Level 1Folding Points: 392772 Folding Title: Super Ultimate Folder - Level 1Folding Points: 392772 Folding Title: Super Ultimate Folder - Level 1Folding Points: 392772 Folding Title: Super Ultimate Folder - Level 1Folding Points: 392772 Folding Title: Super Ultimate Folder - Level 1Folding Points: 392772 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 3 Months 2 Weeks 12 h 50 m 30 sec
Reputation Power: 2014
no difference, no advantages or disadvantages. it just make
some people happier if they have to write less code.

Reply With Quote
  #5  
Old February 2nd, 2007, 11:47 AM
ProEdge's Avatar
ProEdge ProEdge is offline
Contributing User
ASP Free Intermediate (1500 - 1999 posts)
 
Join Date: Jan 2004
Location: Somewhere I belong
Posts: 1,565 ProEdge User rank is Sergeant Major (2000 - 5000 Reputation Level)ProEdge User rank is Sergeant Major (2000 - 5000 Reputation Level)ProEdge User rank is Sergeant Major (2000 - 5000 Reputation Level)ProEdge User rank is Sergeant Major (2000 - 5000 Reputation Level)ProEdge User rank is Sergeant Major (2000 - 5000 Reputation Level)ProEdge User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 1 Day 17 h 7 m 15 sec
Reputation Power: 39
The FROM is just an optional keyword you can add. As SW put it, it makes no difference.
__________________
Keep it Prodigy, Keep it Real

Reply With Quote
  #6  
Old February 2nd, 2007, 07:22 PM
Doug G Doug G is offline
Grumpier Old Moderator
ASP Free God 11th Plane (10000 - 10499 posts)
 
Join Date: Sep 2003
Posts: 10,143 Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Weeks 4 Days 23 h 57 m 26 sec
Reputation Power: 181
__________________
======
Doug G
======
I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain

Reply With Quote
  #7  
Old February 5th, 2007, 11:20 AM
sivaramanrajesh's Avatar
sivaramanrajesh sivaramanrajesh is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Location: http://USA/New Jersey/Parsippany/Novartis-East-Hanover.aspx
Posts: 366 sivaramanrajesh User rank is First Lieutenant (10000 - 20000 Reputation Level)sivaramanrajesh User rank is First Lieutenant (10000 - 20000 Reputation Level)sivaramanrajesh User rank is First Lieutenant (10000 - 20000 Reputation Level)sivaramanrajesh User rank is First Lieutenant (10000 - 20000 Reputation Level)sivaramanrajesh User rank is First Lieutenant (10000 - 20000 Reputation Level)sivaramanrajesh User rank is First Lieutenant (10000 - 20000 Reputation Level)sivaramanrajesh User rank is First Lieutenant (10000 - 20000 Reputation Level)sivaramanrajesh User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Week 2 Days 10 h 42 m 27 sec
Reputation Power: 159
Cool

Thanks all for your comments.

Doug I showed them the link which you gave and everyone was happy.

Now I can continue with my style
DELETE tblRajesh WHERE 1 = 1

Thanks
Rajesh Sivaraman.

Reply With Quote
  #8  
Old February 6th, 2007, 01:52 AM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
ASP Free God 46th Plane (27500 - 27999 posts)
 
Join Date: Sep 2004
Location: Israel
Posts: 27,946 Shadow Wizard User rank is General 15th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 15th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 15th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 15th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 15th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 15th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 15th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 15th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 15th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 15th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 15th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 15th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 15th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 15th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 15th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 15th Grade (Above 100000 Reputation Level)  Folding Points: 392772 Folding Title: Super Ultimate Folder - Level 1Folding Points: 392772 Folding Title: Super Ultimate Folder - Level 1Folding Points: 392772 Folding Title: Super Ultimate Folder - Level 1Folding Points: 392772 Folding Title: Super Ultimate Folder - Level 1Folding Points: 392772 Folding Title: Super Ultimate Folder - Level 1Folding Points: 392772 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 3 Months 2 Weeks 12 h 50 m 30 sec
Reputation Power: 2014
I hope you were kidding with the WHERE 1 = 1 ... ?

Reply With Quote
  #9  
Old February 6th, 2007, 08:35 AM
sivaramanrajesh's Avatar
sivaramanrajesh sivaramanrajesh is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Location: http://USA/New Jersey/Parsippany/Novartis-East-Hanover.aspx
Posts: 366 sivaramanrajesh User rank is First Lieutenant (10000 - 20000 Reputation Level)sivaramanrajesh User rank is First Lieutenant (10000 - 20000 Reputation Level)sivaramanrajesh User rank is First Lieutenant (10000 - 20000 Reputation Level)sivaramanrajesh User rank is First Lieutenant (10000 - 20000 Reputation Level)sivaramanrajesh User rank is First Lieutenant (10000 - 20000 Reputation Level)sivaramanrajesh User rank is First Lieutenant (10000 - 20000 Reputation Level)sivaramanrajesh User rank is First Lieutenant (10000 - 20000 Reputation Level)sivaramanrajesh User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Week 2 Days 10 h 42 m 27 sec
Reputation Power: 159
Smile

Quote:
Originally Posted by Shadow Wizard
I hope you were kidding with the WHERE 1 = 1 ... ?


mm yes Shadow.
Comments on this post
Shadow Wizard agrees: so take this candy!

Reply With Quote
Reply

Viewing: ASP Free ForumsOtherASP Free Lounge > How do you people use a DELETE statement in SQL Server?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support |