Content

  • How to Import sql tables from sql file
  • How to Export sql tables to sql file
  • How to Import sql tables with data from sql file
  • How to Export sql tables with data from sql file
  • How to Export all sql tables of database with data from sql file
  • How to Import data of excel sheet in sql server
  • Referential Integrity
  • Identity Column

How to Import sql tables from sql file

To import sql table schema from sql file : Open SQL file in sql server --> use required database (Make chnages in sql file) --> Execute


How to Export sql tables from sql file

Open table in object explorer --> Right clik on table_name --> Click on Script table as --> select file


How to Import sql tables with data from sql file

To import sql table schema with Data from sql file : Open SQL file in sql server --> use required database (Make chnages in sql file) --> Execute


How to Export sql tables with data from sql file

Right click on Database --> Tasks --> Generate Scripts --> Select required objects --> Click on Advcanced tab --> In general option change Type of data to script To Schema and Data


How to Export all sql tables of database with data from sql file

Repeat above process but check all objects after clicking on Generate Scripts


How to Import data of excel sheet in sql server

Right click on Database --> Tasks --> Import Data --> Click on Next -->select Microsoft Excel from Data Source drop down and click next --> Browse the path for excel file and select Excel version and click Next ---> select Microsoft OLE DB Provider for SQL Server and click Next ---> Check first option copy data from one or more tables or views and clikc Next --> Select required sheets from Excel file --> Next ---> Finish


Referential Integrity

A REFERENTIAL INTEGRITY is a database concept that is used to build and maintain logical relationships between tables to avoid logical corruption of data. It is a very useful and important part in RDBMS.

Usually, referential integrity is made up of the combination of a primary key and a foreign key.


Identity Column

An identity column is a numeric column in a table that is automatically populated with an integer value each time a row is inserted.


SQL Operators

SQL has SQL Arithmetic Operators,SQL Bitwise Operators (AND,OR),SQL Comparison Operators etc