From 8439ea1f379041726936a630931a0415d0b36530 Mon Sep 17 00:00:00 2001 From: GuanM <30427262+sxhoio@users.noreply.github.com.> Date: Tue, 19 Nov 2024 15:46:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=9A=84=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 数据库/头歌/数据的更改/数据的更改.sh | 36 ++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 数据库/头歌/数据的更改/数据的更改.sh diff --git a/数据库/头歌/数据的更改/数据的更改.sh b/数据库/头歌/数据的更改/数据的更改.sh new file mode 100644 index 0000000..a24409e --- /dev/null +++ b/数据库/头歌/数据的更改/数据的更改.sh @@ -0,0 +1,36 @@ +-- ********** create database ********** -- +-- ********** Begin ********** -- +create database Books +-- ********** End ********** -- +go + +use Books +go + +-- ********** create table ********** -- +-- ********** Begin ********** -- +create table prices +( + ID int IDENTITY(1,1) not null, + Name varchar(20) not null, + price varchar(30) not null +) +-- ********** End ********** -- +go + +SET NOCOUNT ON + +-- ********** insert ********** -- +-- ********** Begin ********** -- +insert into prices (Name, price) values ('Harry Potter', '$128') +insert into prices (Name, price) values ('Walden', '$5') +-- ********** End ********** -- +go + +SET NOCOUNT ON + +-- ********** update ********** -- +-- ********** Begin ********** -- +update prices set price = '$6' where Name = 'Walden' +-- ********** End ********** -- +go \ No newline at end of file