日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

pl/sql中的赋值运算符_如何在SQL中使用AND / OR运算符?

發布時間:2023/12/1 数据库 47 豆豆
生活随笔 收集整理的這篇文章主要介紹了 pl/sql中的赋值运算符_如何在SQL中使用AND / OR运算符? 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

pl/sql中的賦值運算符

Basically, AND / OR operator is used to retrieving the record from the database. If we give more than one conditions by using AND Operator, then it retrieves the data from the database when both the conditions are true. And if we use OR operator it retrieves data from the database in both cases either one or more condition is true. Here, in this example we use table 1 for retrieving data using AND, OR operator:

基本上, AND / OR運算符用于從數據庫檢索記錄。 如果我們使用AND運算符給出多個條件,則當兩個條件都為真時,它將從數據庫中檢索數據。 而且,如果我們使用OR運算符,則在兩種或兩種情況下,它都從數據庫中檢索數據。 在此示例中,我們使用表1使用AND,OR運算符檢索數據:

Example:

例:

Table 1:

表格1:

Student_IDStudent_NameDeptBranchCourse
15011AmanGautamCSEITB.tech
15028AtulAnandCSECSB.tech
15032Bharti ParmarCSECSB.tech
15068Partha BiswasCSEITB.tech
學生卡 學生姓名 部門 科 課程
15011 阿曼·高塔姆(AmanGautam) 自學考試 科技
15028 阿圖拉南德 自學考試 CS 科技
15032 巴爾蒂·帕瑪(Bharti Parmar) 自學考試 CS 科技
15068 帕薩·比斯瓦斯(Partha Biswas) 自學考試 科技

1) We have to find the Student_Name whose Dept is CSE and Branch is CS using SQL query.

1)我們必須使用SQL查詢來找到其Dept為CSE且Branch為CS的Student_Name。

2) We have to find the Student_Name whose Dept is CSE OR Branch is CS using SQL query.

2)我們必須使用SQL查詢來找到其Cept或Branch是CS的Student_Name。

Table 2:

表2:

Student_IDHODDean
15011Shivani rajpootAditya sikarwar
15028Sanchita nayakAditya Sikarwar
15032Sanchita nayakRK sharma
15068Shivani rajpootRK sharma
學生卡 HOD 院長
15011 西瓦尼·拉布波特 阿迪亞·西卡瓦爾(Aditya sikarwar)
15028 Sanchita nayak 阿迪亞(Aditya Sikarwar)
15032 Sanchita nayak RK夏爾馬
15068 西瓦尼·拉布波特 RK夏爾馬

Here, in this example we use two table which are join by primary and foreign key for retrieving data using AND OR operator.

在此示例中,我們使用兩個表(通過主鍵和外鍵聯接)使用AND OR運算符檢索數據。

1) We have to find the Student_Name, HOD whose Dean is R. K Sharma and Branch is CS using SQL query.

1)我們必須使用SQL查詢來找到其Dean為R. K Sharma而Branch為CS的Student_Name,HOD。

2) We have to find the Student_Name, Dean where HOD is shivani rajpoot using SQL query.

2)我們必須使用SQL查詢找到Student_Name,Dean,其中HOD是shivani rajpoot。

Conclusion:

結論:

In this article, we are using AND OR operator to retrieve data from the database/table. Also, we see the example of how to retrieve data from the single table or more than one table. I hope you understand the concept; if you have any query, feel free to ask in the comment section. I will be trying to give you an answer of your question as soon as possible. We will know more about SQL in the upcoming article.

在本文中,我們使用AND OR運算符從數據庫/表中檢索數據。 另外,我們看到了如何從單個表或多個表中檢索數據的示例。 希望您理解這個概念; 如果您有任何疑問,請隨時在評論部分提問。 我將盡力為您解答。 在下一篇文章中,我們將更多地了解SQL。

翻譯自: https://www.includehelp.com/sql/use-AND-OR-operator-in-sql.aspx

pl/sql中的賦值運算符

總結

以上是生活随笔為你收集整理的pl/sql中的赋值运算符_如何在SQL中使用AND / OR运算符?的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。