数据的更改
This commit is contained in:
parent
5ce0db0c27
commit
8439ea1f37
36
数据库/头歌/数据的更改/数据的更改.sh
Normal file
36
数据库/头歌/数据的更改/数据的更改.sh
Normal file
@ -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
|
Loading…
x
Reference in New Issue
Block a user