I have a tool that generates a DDL script
create table ATTRIBUTE_VALUE (
id int identity not null,
version int null,
);
create table BADGE (
id int identity not null,
version int null,
cms_ci_ref varchar(255) not null unique,
primary key (id)
);
/* more tables */
Notice that the table names are not prefixed by the schema name – I have no control over this. I want to create these tables in myschema, and am hoping there’s some command I can execute before loading this script that will set the current schema to myschema, so that I can then use the DDL without modification.
Something like….
use myschema;
load ddl;
Does SQL Server provide a command like this?
Yes, if using a SQL Server login.
Notes from my link: