What is Schema?
In a SQL database, Schema is the logical structure. It helps the user to categorize the data according to the nature of information available in that database.
For Example: -
In a factory we have multiple departments are available, details for each department staff collected and maintained in different forms. To categorize them under their working department it will be organized as per the department.
Similarly, Schema helps user to categorize the data based on the information.
How to Create Schema:
We can create schema in desired databases by following query.
Syntax:
Create Schema "SchemaName"
Create Schema - Keyword to Create the Schema
SchemaName - Schema where need data to be moved
Possible to Copy data from one Schema to Other:
Yes, it is possible to transfer the data easily from one schema to another. Following code will help to transfer data.
Syntax:
Alter schema "SchemaName" transfer "TableName"
Alter schema - Keyword to alter the Schema
SchemaName - Replace with your Schema Name
TableName - Replace with your Table Name
transfer - Initiates the data transfer.
For Same kind of Blogs stay with us.
Comments
Post a Comment