-
Notifications
You must be signed in to change notification settings - Fork 2
DropTable
Darren Comeau edited this page Oct 11, 2018
·
1 revision
Remove the table from the database
public int DropTable(string schemaName, string objectName);
Parameters
schemaName
String
The database schema which hosts the object.
objectName
String
The name of the database table which we should drop.
Drop a table.
// Setup the Database Tester object using the MS SQL implementation
var connectionstring = @"Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=tempdb;Integrated Security=SSPI;";
VulcanAnalytics.DBTester.DatabaseTester tester = new VulcanAnalytics.DBTester.MsSqlDatabaseTester(connectionstring);
// Parameters for DropTable method
var schemaName = "dbo";
var tableName = "TestPerson";
// Call the DropTable method to remove the table
tester.DropTable(schemaName, tableName);
Intended for use with tables only.