Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: SQL Server
What is the preferred method for writing SQL Statements? Or basically in other words Is there a preferred method for writing SQL statements?
Posted 18-Jun-12 14:10pm
Edited 18-Jun-12 15:26pm
v2
Comments
Wes Aday at 18-Jun-12 19:54pm
   
Do you think you could be a tad more specific?
Member 9138159 at 18-Jun-12 20:28pm
   
What I was wondering is, Does SQL have a preferred method for writing SQL Statements or is it left up to the administration to make up their own SQL statements?
Wes Aday at 18-Jun-12 21:03pm
   
Still not clear. I do not really understand what it is that you are asking but the answer, I think, is it depends. I would like nothing better then to let the DBAs write all the queries and SPs that they want. In my situation the DBAs do not do anything except make backups. I am the one that writes SPs for them. They do not give me access to the databases but expect me to troubleshoot data errors for them. Not to mention the network admins that do not know anything about folder permissions.

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

OK, based upon your question and your comments, I think I can answer your question.
 
First, I'll answer the question of who should write the SQL. That depends on your environment. In my environment, the software developers also write the T-SQL statements (stored procedures mostly). However, I've also worked in environments where the database administrators wrote all of the scripts. I guess my opinion would be to have the person/people with the most experience write the scripts.
 
Second, I'll answer the question of where the scripts should be developed. Normally, the best place to develop scripts (in my opinion) is in the SSMS editor. This allows for intellisence (in newer versions), query planning (to be sure it is optimized), and on the spot testing.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web03 | 2.8.150302.1 | Last Updated 18 Jun 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100