For this tip let’s assume that we are changing the collation of every column in our database. If you read the following link,Set or Change the Column Collation, from TechNet you’ll notice that there are some
When you change collation of database, it will be new default for all new tables and columns, but it doesn't change the collation of existing objects inside database. You have to go and change manually the collation of every table and column. Luckily there are scripts available on the int...
1. Using SQL Query ALTER TABLE table_name ADD column_name tada_type NOT NULL CONSTRAINT constraint_name DEFAULT default_value; If you set the new column nullable, that column value for all existing rows will be NULL instead of the default value. In that case, you can addWIT...
How to convert the row data to column in sql server The STUFF function inserts a string into another string. It deletes a specified length of characters in the first string at the start position and then inser
Before going through the workaround to update the values in identity column, you have to understand that: You cannot update the value of the identity column in SQL Server using UPDATE statement. You can delete the existing column and re-insert it with a new identity value. ...
To check the state of a database in SQL Server, you can use the following query: SELECT name, state_desc FROM sys.databases; This query will return a list of all the databases on your SQL Server instance and their current state. The state_desc column will show you the current state of...
replicated article. For simple cases this is quite straightforward - adding a column is achieved usingsp_repladdcolumn, whilesp_repldropcolumnis used to drop a column. However, what if we want tochangean existing column- e.g. change the Fname varchar(50) column below to Fname varchar(100...
Before I foundedSQL Spreads(an Excel Add-in to Import and Update SQL Server data from within Excel), I worked as a Business Intelligence consultant for many years using Microsoft’s BI-tools, such as SQL Server, SSIS, Reporting Services and Excel, among others. ...
If you’ve been developing in SQL Server for any length of time, you’ve no doubt hit this scenario: You have an existing, working query that produces results your customers or business owners say are correct. Now, you’re asked to change something, or perhaps you find out your existing...
key forTopicPageRole, it's not actually likely to change ever (it certainly shouldn't be a ...