What happens when we run into the problem where we need to make changes to a column in a SQL database after the creation (especially when it has values in it)? Check out the solution in the video Changing Column Data, Types or Values In T-SQL (or SQL). As you can see, we review what this may mean given that the table has data and we're making changes after the creation and data are stored.
Some topics in the video that are worth a review:
For mastering data transformation from one form to another form, check out the highest-rated Automating ETL course on Udemy. For a coupon to the course, check out the trailer video on the channel SQL In Six Minutes.
As a note, be careful about exceptional design and situations. While it may be tempting to throw an exceptional solution in a particular situation - such as a one-time fix in pre-production - we have to remember that this will cause major issue in other environments and a possible outage in production. A quick-fix in one environment may not be possible in a higher environment, meaning that we'll have an outage without a possible quick-fix. If changes must be made on a table after they are created and are full of data, our solution must function in all environments without manual intervention or else we run the risk of an outage.
One regular point I like to remind my audience, especially as of recent: we can often solve the same problem with a variety of techniques. While we look at one or two ways to solve the problem, these aren't the only ways we can approach this problem. The most appropriate solution to a problem is one in which you can troubleshoot quickly in the future and one in which you understand. Be careful about applying solutions that solve a problem, but introduce new problems in the future.
SECURITY ALERT! Want to know the latest in security? Check out the subreddit Security Testing for the latest information, tools and courses that will help you strengthen your personal security and your company's security. Best of all, we're a subreddit created by security professionals for security professionals and individuals interested in security.
A great re-occuring example of this is my discussion on alerting best practices. There are a variety of alerts everywhere for everything in today's development environments, but many of these alerts cause more issues than they solve (one of which is creating a distraction). Be careful about "easy" solutions which introduce bigger problems. Know your environment and where to apply the best solution. Of course, all these being written, it is helpful to learn new techniques to solve problems because they may be useful in the future.
SQL In Six Minutes | Automating ETL | T-SQL In 2 Hours | Consumer Guide To Digital Security