Connect to SQL Server Using Visual Studio Code 2022 and Run SQL Queries (Create Read Update Delete)

preview_player
Показать описание
How to connect to sql server database using vs code 2022. How to run CRUD operations using vscode

############ SQL queries #############
-- get current database:
select DB_NAME()

-- create database
create database myshop

-- select database
use myshop

-- create table:
CREATE TABLE users
(
id INT NOT NULL PRIMARY KEY IDENTITY(1,1),
username varchar(90) NOT NULL,
email varchar(100) NOT NULL,
register_date datetime default CURRENT_TIMESTAMP
)

-- insert rows
INSERT INTO users
(username, email)
VALUES
GO

-- read rows
select * from users

-- Update rows in table 'users'
UPDATE users
SET
WHERE id=4
GO

-- Delete rows from table 'users'
DELETE FROM users
WHERE id=4
GO

-- execute multiple queries
create table products
(
id INT NOT NULL PRIMARY KEY IDENTITY(1,1), -- primary key column
product_name VARCHAR(100) NOT NULL,
purchase_price INT NOT NULL,
sale_price INT NOT NULL,
description TEXT
);

create table messages
(
id INT NOT NULL PRIMARY KEY IDENTITY(1,1),
message TEXT,
created_at datetime default CURRENT_TIMESTAMP
);

-- drop table
drop table products .

***********************************

🔥 *Complete Udemy Courses* :

⬇️ *Free Document Proofreading* ⬇️
Рекомендации по теме
Комментарии
Автор

Perfect one !
Cleared all my concepts thank you

programs
Автор

Great video, I'm getting started with programming and all that stuff, this was very useful and helpful. Thanks.

Nelson-bncy
Автор

Oh yes perfect, i started MySQL like 3 weeks ago

lucaabg
Автор

Hey there, God bless your efforts.
I a a newbie sql learner with a simple enquiry.
Where can i find a table with its properties that i have already created in sql managment studio?
Thanks for taking care of this.

hasanmougharbel
Автор

Do you have an example of Login React Native connecting to sql server, reading, writing, deleting, saving... and outputting to gridview ?

tienphanmemtinh
Автор

Why I would like to learn how to run queries from VS code if I can do it from the SQL administration tool like Workbench, the question is how to execute queries using class and my own variables to insert them in the DB?

MrJonathanRB
Автор

How to move the result window below our query permanently, in the whole video result coming in right, in thumbnail it's below the query? How to do this

shreyashchoudhary
Автор

Best Tutorial! Solved all my problems :)
Thank you so much!! 🥰❤

katharinafischer
Автор

can i delete SQL SERVER before connect to vs studio code ?

nam
Автор

how do you change sql server to black mode ?

nam
Автор

I keep getting this error which I don't understand. I can connect to the instance fine with sqltools extension, but when I try to with the sql server extension, I get this error

mssql: Error 87: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SNI_PN11, error: 25 - Connection string is not valid)

ynnguyen
Автор

this voice have to Zlatan ? hahaha
same like

Burakcelik
Автор

Could you also tell me how to build form using vs code and store it in database

programs
Автор

WHY GO THROUGH THROUGH THIS TORCHURE WHEN YOU HAVE SSMS?

drkenny
welcome to shbcf.ru