Click here to Skip to main content
12,750,710 members (38,498 online)
Rate this:
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
Updated 18-Jun-12 15:26pm
Wes Aday 18-Jun-12 19:54pm
Do you think you could be a tad more specific?
Member 9138159 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 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
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.

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

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170215.1 | Last Updated 18 Jun 2012
Copyright © CodeProject, 1999-2017
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