MSSQL.create_schema
- MSSQL.create_schema(schema_name, verbose=False)
Create a schema.
- Parameters
schema_name (str) – name of a schema in the currently-connected database
verbose (bool or int) – whether to print relevant information in console, defaults to
False
Examples:
>>> from pyhelpers.dbms import MSSQL >>> testdb = MSSQL(database_name='testdb') Creating a database: [testdb] ... Done. Connecting <server_name>@localhost:1433/testdb ... Successfully. >>> test_schema_name = 'test_schema' >>> testdb.create_schema(schema_name=test_schema_name, verbose=True) Creating a schema: [test_schema] ... Done. >>> testdb.schema_exists(schema_name=test_schema_name) True >>> testdb.drop_database(verbose=True) # Delete the database [testdb] To drop the database [testdb] from <server_name>@localhost:1433 ? [No]|Yes: yes Dropping [testdb] ... Done.