SQL-Tips : create table with script |

Published: 10 September 2020
on channel: Simple Tips
56
6

Hi everyone,
In this video , you can create a table in sql server by many ways.
---------------------------------------------------------------
Script:
/*
Many ways create table in SQL server
*/
--1. Create table physic
CREATE TABLE tbl_1
(
ID BIGINT IDENTITY(1,1),
code VARCHAR(10),
Name NVARCHAR(100)
)
-- 2. create temp table
CREATE TABLE #tbl_1
(
ID BIGINT IDENTITY(1,1),
code VARCHAR(10),
Name NVARCHAR(100)
)
-- 3. create variable table
DECLARE @table AS TABLE
(
ID BIGINT IDENTITY(1,1),
code VARCHAR(10),
Name NVARCHAR(100)
)
--4. create table from another table
SELECT * INTO tbl_2 FROM dbo.tbl_1


On this page of the site you can watch the video online SQL-Tips : create table with script | with a duration of hours minute second in good quality, which was uploaded by the user Simple Tips 10 September 2020, share the link with friends and acquaintances, this video has already been watched 56 times on youtube and it was liked by 6 viewers. Enjoy your viewing!