Click here to Skip to main content
13,353,124 members (60,931 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


3 bookmarked
Posted 12 Jun 2011

I don’t know why my boss always gets angry

, 12 Jun 2011
Rate this:
Please Sign up or sign in to vote.
I don’t know why my boss always gets angry when I alter Microsoft SQL Server database objects such as storedProcedure, functions, views, etc.

My friend has been working in a Software Company as a “Database Developer” for the last couple of years. When we met for some reason, most of the time I find out that he is very upset. Several times, I asked him why he was looking so upset, and every time he didn't reply to my question.


One evening, he came to my home and told me that he didn't know why his boss was always getting angry when he altered the Microsoft SQL Server database objects such as storedProcedure, functions, views, etc.


I just smiled and said, "Don’t worry, my friend, I will show you why."
In this section, I would link to show you why DROP AND CREATE database objects is much better than the alter objects. Let’s consider the scenario listed below:

(i) For example, we will create a simple storedProcedure name “[dbo].[spGetEmployees]” first.
(ii) Get that storedProcedure information from the system table by executing “sp_help”. Figure (a) shows the created time, after creating and performing ALTER.

Figure (A)


(iii) Record the storedProcedure created time.
(iv) After few minutes, alter the storedProcedure and do the scenario (ii) again.
(v) Few minutes later, do some update to the storedProcedure and this time we do not use ALTER, we use DROP AND CREATE process. Finally, do the scenario (ii) again. Figure (b) shows the created time which is updated, after creating and performing DROP AND CREATE.

Figure (B)



Do you find anything that makes sense; I hope you got the point, after creating an SQL database object and you alter over and over again, the created time of that object remaining the same. Sometimes, we need to track database object modification information.

So I would always prefer “DROP AND CREATE” rather than the ALTER statement.


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


About the Author

Md. Marufuzzaman
Bangladesh Bangladesh
A well experienced leader with successful track record of software development, product innovations, brand management and corporate communication etc. Some successful product innovations have also achieved and awards “Most Valuable Professional” (MVP) at 2010 and 2011 by and also selected as a mentor of Published over 100 technical articles in various software development resource sites (i.e.,, Microsoft MSDN, and IEEE & IBM (In progress)) and various IT Forums, Blogs etc.

Over twelve years of professional experiences in ICT field having extensive experience in formulating corporate vision and long term strategy. Leading development related functions including design, development, services, data management and analytics, customer experience management, content services, digital analytics and optimization.I have also more than two years’ of strong experience in mobile-VAS (platform development).

An individual with results-driven approach and relentless in pursuit of excellence from a business and organizational standpoint.Honest, believes in transparency, commitment and teamwork.

Expertise: Software/Solution Architect, Research, MIS, Data Analytics, Data Mining, BI, SaaS platform base application development, Large scale Win32 Form/Web based business software solutions, Security, Enterprise applications development, integration, etc.

Technologies/Tools: Microsoft.Net version 05/08/10/12, Microsoft SQL Server version 7/2K/05/08/12/14 , Oracle version 10/11, MySql version 5.1, 5.5, 5.7, Visual C#, VB.NET, ASP.NET, API, MVC, WebAPI , WPF, WCF, PHP, Microsoft Power BI, SPSS, PS2, R, Add-In, Visual Basic etc.

.Net UI component: Telerik, DevExpress, Ext.Net.
Scripting language: JavaScript, AngularJS, node.JS.
Source control / Subversion: Git,SVN.
Development methodologies: Agile,RAD.
Project Management / Issues Tracking Tools: JIRA, ClockingIt.

You may also be interested in...


Comments and Discussions

QuestionYou can use sys.objects modify_date Pin
Nicola Tufarelli12-Mar-13 8:54
memberNicola Tufarelli12-Mar-13 8:54 
GeneralReason for my vote of 3 I'd like to see another example.. :( Pin
INRIP16-Jun-11 10:28
memberINRIP16-Jun-11 10:28 
GeneralReason for my vote of 1 Ugg. Pin
Keep on Truckin'13-Jun-11 16:11
memberKeep on Truckin'13-Jun-11 16:11 
GeneralHi Deeksha Shenoy: Thanks a lot..... Pin
Md. Marufuzzaman12-Jun-11 6:50
mentorMd. Marufuzzaman12-Jun-11 6:50 
QuestionAnother situation to prefer "ALTER" than "DROP / CREATE" Pin
Wolle Wagner20-Jun-11 12:37
memberWolle Wagner20-Jun-11 12:37 
AnswerRe: Another situation to prefer "ALTER" than "DROP / CREATE" Pin
Md. Marufuzzaman11-Jul-11 7:42
mvpMd. Marufuzzaman11-Jul-11 7:42 

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.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.180111.1 | Last Updated 12 Jun 2011
Article Copyright 2011 by Md. Marufuzzaman
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid