Saving changes is not permitted | Prevent saving changes that require table re-creation - Sql server

Mar 07, 2019 BY SOL

This problem occurs when the Prevent saving changes that require the table re-creation option is enabled, and you make one or more of the following changes to the table:You change the Allow Nulls setting for a column.You reorder columns in the table.You change the column data type.You add a new colu...

Find All Columns of All Tables For a Keyword - Sql Server

Feb 20, 2019 BY xtreme

a custom functiondeclare @StringToSearch nvarchar(100) set @StringToSearch='Establishment'CREATE TABLE #Results (_ColumnName nvarchar(370), ColumnValue nvarchar(3630)) DECLARE @TableName nvarchar(256), @_ColumnName nvarchar(128), @SearchStr nvarchar(110) SET @TableName = '' SET @SearchStr = QUOT...

Find All Tables and Views Having Column with Specified Name - Sql Server

Feb 20, 2019 BY xtreme

Search Column Name in Tables n ViewsSELECT COLUMN_NAME AS 'ColumnName',TABLE_NAME AS 'TableName' FROM INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_NAME LIKE '%MyName%' ORDER BY TableName ,ColumnName; Search in Tables onlySELECT c.name AS 'ColumnName' ,t.name AS 'TableName' FROM sys.columns c JOIN ...

List All Tables, Views - Sql Server

Feb 20, 2019 BY xtreme

list all tables All Tables In Sql 2000SELECT NAME FROM sysobjects WHERE xtype='U' All Tables In Sql 2005 and above SELECT TABLE_NAME FROM .INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE'list all viewsAll Views In Sql 2000 SELECT NAME FROM sysobjects WHERE xtype='V' All Views I...

Drop all tables n stored procedure in Sql Server

Feb 18, 2019 BY xtreme

Can Remove all Tables and Store Procedure for a Database at once. Drop all user defined tables EXEC sp_MSforeachtable @command1 = "DROP TABLE ?"Drop all user defined Stored ProceduresDeclare @pName varchar(500) Declare sqlcur Cursor For Select [name] From sys.objects where type = 'p' Open sqlcu...