Thursday, 23 July 2015

Query to alter column name in sql server 2008

Top sites by search query "query to alter column name in sql server 2008"

sql server 2008 - Quickly change NULL column to NOT NULL - Database Administrators Stack Exchange


  http://dba.stackexchange.com/questions/48872/quickly-change-null-column-to-not-null
One problem with this is that even if you know the column in fact has no NULLs the constraint is not trusted by the query optimiser which means that the plans can be sub optimal. Adding the constraint with NOCHECK means that no rows will need to be read to verify it, and if you are starting from a position where the column does not contain NULL values (and if you know none will be added between checking and adding the constraint) then, as the constraint prevents NULL values being created from future INSERT or UPDATE operations, this will work

  http://blog.sqlauthority.com/2008/04/08/sql-server-change-order-of-column-in-database-tables/
First of all, If there is any application which depends on the order of column it is really not good programming and will create problem for sure in future. With the time passing, the developper must add a colum like Deathday, as the life is not eternal, to notify the death of our preferred singer Miachael Kackson for example

sql server - How to change the data type of a column with query? - Stack Overflow


  http://stackoverflow.com/questions/408825/how-to-change-the-data-type-of-a-column-with-query
If you are using SQL Server, you can make the SQL Server Management Studio do the work for you! Bring up your table structure (right-click on the table and select "Modify") and make all of your changes (if the column transformation is illegal, just add your new column - you'll patch it up in a moment). Next, right-click on the background of the Modify window and select "Generate Change Script." In the window that appears, you can copy the change script to the clipboard

  http://blog.sqlauthority.com/2008/08/06/sql-server-query-to-find-column-from-all-tables-of-database/
Is there any easiest way to find that? There are lots of scripts and stored procedures available on the internet but I am looking for some simplest way. I have some queries, but they return values for only user created tables and not system tables or tables created by an asp.net web application for instance

No comments:

Post a Comment