How to Create Tables in Microsoft SQL Server (SQL Server Management Studio) | SQL Server 2019

Publié le: 11 mars 2022
sur la chaîne: Infoloomia
36
0

Complete Demonstration, How to create tables in SQL Server 2019 or in any other version

--Syntax Create Table
Create Table Employee
(
EmpID Int,
EmpName Varchar(20),
Department Varchar(10)
)


--Syntax Insert Data Values in the Table
Insert into Employee Values (1,'Peterson', 'IT')
Insert into Employee Values (2,'Robertson', 'HR')
Insert into Employee Values (3,'Lisa', 'Accounts')


--Fetch Data from Table
Select * from Employee

-- Create Table from an Table. This will Create new Table with All Data
Select * into Employee_New from Employee

Select * from Employee_New

-- Create Table St from an Table. This will Create new Table with NO Data
Select * into Employee_New1 from Employee where 1=1

-- If you have Table Structure, how to Insert Data from another table
Insert into Employee_New1
Select * from Employee


-- how to Insert Data from another table for selected columns
Insert into Employee_New1(EmpID, EmpName)
Select EmpID, EmpName from Employee


#Tables, #CreateTablesSQLServer, #SQLServerTables, #SQLServer2019, #Infoloomia, #DatabaseTables,


Sur cette page du site, vous pouvez voir la vidéo en ligne How to Create Tables in Microsoft SQL Server (SQL Server Management Studio) | SQL Server 2019 durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Infoloomia 11 mars 2022, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 36 fois et il a aimé 0 téléspectateurs. Bon visionnage!