From cbd24d17149e290e923c072fa944c241ac8cadeb Mon Sep 17 00:00:00 2001 From: GuanM <30427262+sxhoio@users.noreply.github.com.> Date: Tue, 19 Nov 2024 15:34:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8WHERE=E8=AF=AD=E5=8F=A5?= =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E6=A3=80=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../使用WHERE语句进行检索/使用WHERE语句进行检索.sh | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 数据库/头歌/使用WHERE语句进行检索/使用WHERE语句进行检索.sh diff --git a/数据库/头歌/使用WHERE语句进行检索/使用WHERE语句进行检索.sh b/数据库/头歌/使用WHERE语句进行检索/使用WHERE语句进行检索.sh new file mode 100644 index 0000000..7c5a1ae --- /dev/null +++ b/数据库/头歌/使用WHERE语句进行检索/使用WHERE语句进行检索.sh @@ -0,0 +1,22 @@ +USE Mall +Go + +SET NOCOUNT ON + +---------- retrieving with range ---------- +-- ********** Begin ********** -- +SELECT prod_name, prod_price +FROM Products +WHERE prod_price BETWEEN 3 AND 5; +-- ********** End ********** -- + +GO + +---------- retrieving with nomatches ---------- +-- ********** Begin ********** -- +SELECT prod_name, prod_price +FROM Products +WHERE prod_name <> 'Lion toy'; +-- ********** End ********** -- + +GO \ No newline at end of file