SQL Server???????洢????
???????????? ???????[ 2015/5/8 13:43:12 ] ?????????????
????1.??????δ洢????
????--1.??????δ洢????
????if (exists (select * from sys.objects where name = 'getAllBooks'))
????drop proc proc_get_student
????go
????create procedure getAllBooks
????as
????select * from books;
????--???????д洢????
????exec getAllBooks;
????2.???洢????
????alter procedure dbo.getAllBooks
????as
????select book_auth from books;
????3.????洢????
????drop procedure getAllBooks;
????4.???????洢????
????sp_rename getAllBooks??proc_get_allBooks;
????5.????????????洢????
?????洢????????????????????????????????
???????????????????洢??????????????java???????c?е???????
????????????????????洢??????λ?????????java??????????????
?????????????????????:
??????????????????????????????????????丳?????????????
?????????????????????????????????????????????????????
???????????????????????????????????????????????????????????????
????(1)??????????洢????
????if (exists (select * from sys.objects where name = 'searchBooks'))
????drop proc searchBooks
????go
????create proc searchBooks(@bookID int)
????as
????--???book_id??????????????
????select * from books where book_id=@bookID;
????--???searchBooks
????exec searchBooks 1;
????(2)??2???????洢????
????if (exists (select * from sys.objects where name = 'searchBooks1'))
????drop proc searchBooks1
????go
????create proc searchBooks1(
????@bookID int??
????@bookAuth varchar(20)
????)
????as
????--???book_id??book_Auth??????????????
????select * from books where book_id=@bookID and book_auth=@bookAuth;
????exec searchBooks1 1??'???';
????(3)?????з??????洢????
????if (exists (select * from sys.objects where name = 'getBookId'))
????drop proc getBookId
????go
????create proc getBookId(
????@bookAuth varchar(20)??--???????????????
????@bookId int output --????/??????? ??????
????)
????as
????select @bookId=book_id from books where book_auth=@bookAuth
????--???getBookId????????????洢????
????declare @id int --?????????????????????д洢??????????
????exec getBookId '????'??@id output
????select @id as bookId;--as????????????????????
????(4)????????????洢????
????if (exists (select * from sys.objects where name = 'charBooks'))
????drop proc charBooks
????go
????create proc charBooks(
????@bookAuth varchar(20)='??%'??
????@bookName varchar(20)='%'
????)
????as
????select * from books where book_auth like @bookAuth and book_name like @bookName;
????--??д洢????charBooks
????exec charBooks '??%'??'??%';
????(5)????洢????
????with encryption???????????洢????????.??????????????????? sp_helptext ???洢??????????????????????????????? syscomments ???л??????ù???????.
????if (object_id('books_encryption'?? 'P') is not null)
????drop proc books_encryption
????go
????create proc books_encryption
????with encryption
????as
????select * from books;
????--??д????books_encryption
????exec books_encryption;
????exec sp_helptext 'books_encryption';--??????????"???? 'books_encryption' ???????????"
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
???????sql server 2000??????????????SQL Server???????????????????λ?????SQL Server??????????????????????????????SQL Server??Azure SQL??SQL SERVER ?????????????汾??????SQL Server??WITH (NOLOCK)SQL Server??????????????DML??????????SQL Server????????????????????SQL Server??????SQL Server???????????Ч?????????SQL Server?????????????????SQL Server?????????????????SQL Server????????SQL SERVER????????SQL Server????δ???????SQL SERVER??????????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????