Search
 
SCRIPT & CODE EXAMPLE
 

SQL

edit shchima table in sql

declare @sql varchar(8000), @table varchar(1000), @oldschema varchar(1000), @newschema   varchar(1000)

  set @oldschema = 'hts-shop_com_User'
  set @newschema = 'dbo'

 while exists(select * from sys.tables where schema_name(schema_id) = @oldschema)
  begin
      select @table = name from sys.tables 
      where object_id in(select min(object_id) from sys.tables where  schema_name(schema_id)  = @oldschema)

    set @sql = 'alter schema ' + @newschema + ' transfer [' + @oldschema + '].' + @table
	print @sql
   exec(@sql)
 end
Comment

PREVIOUS NEXT
Code Example
Sql :: firebase sql 
Sql :: how to reset id column in sql server 
Sql :: representation arbres de requete en postgresql 
Sql :: utiliser sql ligne de commande 
Sql :: how to fetch highest score in minimum time using mysql 
Sql :: PostgreSQL random boolean for generate test values 
Sql :: "Edad en Oracle" 
Sql :: How to Group by and concatenate arrays with all columns in PostgreSQL 
Sql :: compare two tables to find unmatched records 
Sql :: sql compound operators 
Sql :: mysql docker image arjun 
Sql :: sql server o arquivo solicitado não pode ser baixado 
Sql :: tsql rename column name 
Sql :: in operator in sql 
Sql :: phpmyadmin access denied 
Sql :: what is sql clause 
Sql :: mysql view command 
Sql :: Extract Data from SQL Server into XML Format 
Sql :: sql id serial primary key 
Sql :: raven ql select count 
Csharp :: c# mark as deprecated 
Csharp :: open link c# 
Csharp :: ngrok for asp.net core 
Csharp :: como crear un numero aleatorio en c# 
Csharp :: unity ray from mouse position 
Csharp :: how to disable and enable rigidbody unity 
Csharp :: c# serialize json 
Csharp :: camera follow player unity smooth 
Csharp :: unity print to console 
Csharp :: c# messagebox 
ADD CONTENT
Topic
Content
Source link
Name
2+5 =