Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

SQL.pdf

355 views

Published on

SQL

Published in: Education
  • Be the first to comment

SQL.pdf

  1. 1. SQL desoukay(at) yahoo(dot)com ‫اﻟﺠﻮف‬ ‫ﺟﺎﻣﻌﺔ‬-‫اﻟﺘﺮﺑﻴﺔ‬ ‫ﻛﻠﻴﺔ‬-‫اﻵﻟﻲ‬ ‫اﻟﺤﺎﺳﺐ‬ ‫ﻗﺴﻢ‬
  2. 2. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬٢‫من‬٦٣
  3. 3. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬٣‫من‬٦٣ ‫م‬ ‫א‬‫م‬ ‫א‬‫م‬ ‫א‬‫م‬ ‫א‬Queries ª ‫אض‬ ‫א‬ ‫د‬ ‫وط‬ ‫و‬ Ù ‫ول‬ Ğ‫א‬ ª ę ‫م‬ ‫א‬ ‫א‬ ª ‫א‬‫وط‬ ‫وא‬ Ù ‫א‬ K ª ‫א‬ ‫א‬ ‫א‬ ‫م‬SQL‫م‬ ‫א‬ Structured Query Language‫א‬ ‫م‬ ‫א‬‫א‬ ‫م‬ ‫א‬‫א‬ ‫م‬ ‫א‬‫א‬ ‫م‬ ‫א‬ ª ‫م‬ ‫وא‬ ‫א‬ ‫א‬ ‫א‬K •‫אل‬SQL‫א‬ Ħ ‫ق‬Ù ú‫و‬ ę ‫وא‬ ‫א‬ ª ‫د‬ ‫א‬ ‫ن‬ úCapital •‫אل‬SQLً ‫دא‬; ‫אل‬‫אل‬‫אل‬‫אل‬SQL‫م‬‫م‬‫م‬‫م‬ Kª ‫א‬(DDL)Data Definition Language ª ‫א‬ ‫م‬ ‫א‬ ‫وא‬ ‫א‬‫אول‬ Ğ‫وא‬ ‫دא‬ ª ‫א‬ ‫א‬ORACLE‫و‬SQL-SERVER‫אم‬ ª ‫א‬ SQL‫وא‬ ‫ل‬ ‫א‬ ğ‫א‬ ‫א‬ K ‫א‬ ‫و‬ ‫د‬ ‫אم‬ ‫א‬ ‫وא‬ ‫ل‬ ‫א‬ ‫א‬ ‫א‬ ‫א‬ ªK ‫و‬Ğ‫א‬ ‫א‬‫ل‬ •‫ول‬ •Lú‫ول‬ •‫ول‬ •ª ‫א‬‫אول‬ Ğ‫א‬ Ħ Kª ‫א‬ Ğ(DML)Data Manipulation Language ‫و‬ ً ‫א‬ ‫وא‬ ‫א‬ ‫و‬ •‫אج‬ ‫د‬Lª •ĜLª •ª ú •‫ع‬ Ø ‫א‬L‫م‬ ‫א‬ª
  4. 4. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬٤‫من‬٦٣ Kª ‫א‬ ‫א‬(DCL)Data Control Language Ħ ‫א‬ ª Ğ ª ‫א‬ ‫א‬ ‫دא‬ ‫א‬ ‫א‬ ‫א‬ ‫ل‬ ª ‫א‬ ‫و‬ ‫אل‬ ‫وא‬SQL‫א‬ ª ‫א‬ ħ DDL DML DCL CREATE TABLE DROP TABLE ALTER TABLE CREATE INDEX INSERT INTO SELECT INTO UPDATE DELETE SELECT UNION TRANSFORM PARAMETER ALTER DATABASE CREATE GROUP DROP GROUP CREATE USER ALTER USER DROP USER ADD USER GRANT PRIVILEGE REVOKE PRIVILEGE ‫مالحظات‬•‫وא‬DCL‫אل‬ ġ ‫ل‬ for ApplicationsVisual Basic‫دא‬ī ‫و‬ ‫אل‬ ‫دא‬SQL‫دא‬K
  5. 5. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬٥‫من‬٦٣ ª ‫א‬ ‫אع‬ª ‫א‬ ‫אع‬ª ‫א‬ ‫אع‬ª ‫א‬ ‫אع‬ęęęęĝĝĝĝ •‫م‬ ‫א‬‫א‬Select query oġ ‫د‬ĩ ę ‫و‬ ‫ول‬ ‫א‬ ª ‫א‬Ó‫א‬ ‫و‬ ª ‫א‬ª ‫א‬ ‫وط‬ Ĝ ‫א‬Kª ‫א‬ ‫א‬ ħ. •‫م‬ ‫א‬Ò‫א‬ ‫אول‬ Ğ‫א‬Cross Tab Query o‫م‬ Ĝ ‫دא‬ ‫و‬ě ‫א‬ ª ‫א‬ ě ‫א‬ Ġ‫א‬ ª ‫א‬ ‫א‬ ‫و‬ Ġ Ĝ ‫و‬‫א‬K •‫م‬ ‫א‬ĜUpdate Query o‫و‬ Ĝ‫ط‬ ‫ون‬ ‫و‬ ‫وط‬ ‫ول‬ ªK •‫م‬ ‫א‬Append Query o‫ط‬ ‫ون‬ ‫و‬ ‫ط‬ ‫ول‬ ħ ªK •‫م‬ ‫א‬úDelete Query o‫א‬ ‫و‬ úª‫ط‬ ‫ول‬ ‫ط‬ ‫ون‬ ‫و‬K •‫م‬ ‫א‬‫ول‬Make Table Query oª Ģ ‫ول‬ ‫ل‬ ª ‫א‬SQL •‫م‬ ‫א‬‫א‬Union Query o‫و‬ ‫د‬‫و‬ ‫ول‬ ª ‫ول‬K •‫م‬ ‫א‬‫א‬Pass-Through Queries o‫م‬‫وא‬ ‫ل‬SQL‫אل‬ ‫ل‬ ª ‫دم‬ ħODBC‫و‬‫ن‬ ‫وא‬ ‫א‬ ‫و‬ ‫ن‬ ‫و‬ ª ‫ض‬ ‫د‬ ‫دود‬ ‫א‬ ª ‫א‬ ‫م‬K •‫م‬ ‫א‬ª ‫א‬Data Definition Queries o‫م‬ ‫و‬‫و‬ ‫אول‬ Ğ‫א‬ ‫و‬ ú ‫و‬‫س‬ ‫א‬KFDDLE •‫א‬‫م‬‫א‬Sub-query oª ‫א‬ ª ‫א‬ ‫و‬ ª ‫א‬ ‫א‬ ª ‫א‬ ‫م‬ ‫و‬K
  6. 6. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬٦‫من‬٦٣ ‫م‬ ‫א‬ ‫ق‬‫م‬ ‫א‬ ‫ق‬‫م‬ ‫א‬ ‫ق‬‫م‬ ‫א‬ ‫ق‬WWWW Ô ‫א‬ ‫אم‬ ‫א‬ ‫ون‬ ‫و‬ Ô ‫א‬ ‫אم‬ ‫م‬ ‫א‬ ĦFً ‫و‬ ‫م‬ ‫א‬E F‫א‬ ‫ض‬E ‫م‬ ‫א‬‫م‬ ‫א‬‫م‬ ‫א‬‫م‬ ‫א‬WWWW ‫م‬ ‫א‬ ‫א‬ ª Ğ ‫א‬ ‫אع‬ × ‫א‬ ĢW •‫א‬ ‫ض‬ o‫و‬ ‫א‬ ě ‫و‬ •‫א‬ ª ‫א‬ Ô o‫و‬ ª ‫א‬ ‫אع‬ ‫و‬ً ‫א‬ ‫א‬ ª ‫א‬ ‫אع‬ ‫ول‬ Ğ‫א‬ ª ī ‫وط‬ ‫و‬ ÙL‫אول‬ Ğ‫א‬K •‫و‬ Ğ‫א‬ ª ‫א‬ Ô o ‫و‬ Ħ ª ğ‫א‬ ‫وא‬ ‫د‬ ‫وא‬ ‫ع‬ Ó‫א‬ ª ‫وא‬ ġK
  7. 7. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬٧‫من‬٦٣ •‫א‬ ‫א‬ ‫م‬ ‫א‬ Ô‫א‬ o ‫א‬ ª ‫א‬ ‫و‬ Ħ ‫و‬ Ħ ‫ن‬K •ª ‫א‬ Ù ‫א‬ ‫م‬ ‫א‬ Ô o ‫א‬ Ù ª ‫א‬ ‫و‬ Ħ ‫و‬ Ħ ‫ن‬K ‫م‬ ‫א‬ ‫و‬ ‫ق‬‫م‬ ‫א‬ ‫و‬ ‫ق‬‫م‬ ‫א‬ ‫و‬ ‫ق‬‫م‬ ‫א‬ ‫و‬ ‫ق‬ ‫م‬ ‫א‬ Ħ •‫א‬ ‫אم‬ ‫א‬ ħ‫و‬ ‫א‬‫א‬ ‫و‬ ‫م‬SQL •ª‫א‬ ‫و‬ ‫م‬ ‫א‬ ‫א‬ ‫א‬SQL
  8. 8. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬٨‫من‬٦٣ ‫א‬ ‫א‬‫א‬ ‫א‬‫א‬ ‫א‬‫א‬ ‫א‬ •‫م‬ ‫ن‬ ‫א‬ ‫ل‬ ğ‫א‬ Ú Ø ‫א‬F‫ول‬ Ğ‫א‬KE •Ģ ğ‫א‬ ‫א‬ ‫ن‬ ‫ذא‬– ‫א‬ ‫و‬ ‫א‬ ‫א‬JĦ Ħ Ħ[ ]K •Ù ‫ن‬ × ğ‫א‬ ‫א‬ ‫ذא‬ ‫א‬ ‫א‬– JK ‫م‬ ‫א‬ Ġ‫א‬ ª‫م‬ ‫א‬ Ġ‫א‬ ª‫م‬ ‫א‬ Ġ‫א‬ ª‫م‬ ‫א‬ Ġ‫א‬ ª ª ‫א‬ • ‫א‬ Ġ‫א‬SQL?SQLğ Ù? •‫د‬ Ù ‫و‬ ‫ول‬ Ğ‫א‬ ‫א‬ ª ‫ول‬ Ġ‫א‬ •‫ل‬ ‫د‬ ‫و‬ ‫א‬ Ġ‫א‬ ğ‫א‬ ‫א‬ ‫و‬
  9. 9. ‫صفﺤة‬٩‫من‬٦٣ ‫الخولي‬ ‫المتولي‬ ª ‫א‬ ‫א‬ ‫ل‬‫א‬‫א‬‫א‬ ‫א‬ ‫אول‬ Ğ‫א‬ ‫ل‬ ‫و‬ ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬ ª ‫א‬ ‫א‬ ‫ل‬ ‫א‬ ‫אول‬ Ğ‫א‬ ‫ل‬ ‫و‬
  10. 10. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬١٠‫من‬٦٣
  11. 11. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬١١‫من‬٦٣ (DML)Data Manipulation Language ‫و‬ •‫א‬ ‫م‬ ‫א‬ •‫א‬ ‫م‬ ‫א‬ •‫א‬ ‫م‬ ‫א‬ •ú ğ‫א‬ ‫م‬ ‫א‬
  12. 12. ‫صفﺤة‬١٢‫من‬٦٣ ‫و‬ ª ‫א‬ ĩ ę ‫و‬ ‫ول‬ ‫א‬ ª ‫א‬ ª ‫א‬ ‫א‬ ħ. ‫و‬ ª ‫א‬ ‫אص‬ ¯Ø ‫א‬ ªğ‫א‬ ‫א‬ ‫و‬ ª ‫א‬E SELECT [predicate] { * | table. [table.]field2 [AS alias2] [, ...]]} FROM tableexpression [, ...] [IN [WHERE ... ] [GROUP BY ... ] [HAVING ... ] [ORDER BY ... ] [WITH OWNERACCESS OPTION DISTINCTROW‫و‬TOP. ‫א‬ ª ‫א‬ ‫د‬ ‫א‬KĦ ‫م‬ ‫אول‬ Ğ‫א‬ ‫و‬ ‫ول‬ Ğ‫א‬ ‫ل‬ ğ‫א‬ Ĝ Ħ ‫م‬‫د‬ Ò‫א‬. ª Ĝ ‫א‬ ‫ل‬ ğ‫א‬ Ģ ‫א‬ ‫ول‬ Ğ‫א‬ ‫א‬. ‫دאد‬Ø ‫א‬ ‫אد‬ ‫א‬ ª ‫א‬ Ĝ ‫א‬ ‫ل‬ ğ‫א‬ ÚKĦ ‫و‬ ‫א‬ ‫א‬ Ú ًtable ‫אد‬ ‫א‬ ª ‫א‬ Ĝ ‫א‬ ‫אول‬ Ğ‫א‬ Ú ‫و‬ ‫ول‬ Ğ‫א‬ ‫א‬‫دאد‬Ø ‫א‬. ‫ود‬ ‫א‬ ‫אول‬ Ğ‫א‬ Ĝ ‫א‬ ª ‫א‬ ‫א‬tableexpression (Ù ª ‫א‬ ‫אول‬ Ğ‫א‬ğ‫א‬. ‫الخولي‬ ‫المتولي‬ Select query ġ‫و‬ ª ‫א‬ ĩ ę ‫و‬ ‫ول‬ ‫א‬ ª ‫א‬ ‫وط‬ Ĝ ‫א‬ ª ‫א‬Kª ‫א‬ ‫א‬ ħ ‫א‬ ‫א‬ ‫א‬ ‫و‬ ª ‫א‬ ‫אص‬ ¯Ø ‫א‬ ª ‫א‬ ª ‫א‬ ‫א‬ Ù ‫م‬ ‫א‬ ‫א‬F‫א‬ ‫و‬ ª ‫א‬ SELECT-FROM table.* | [table.]field1 [AS alias1] [, ...]]} IN externaldatabase] OPTION] ‫א‬ ‫א‬ ‫א‬W ‫א‬ ‫א‬ ª‫א‬ ‫א‬: ALL‫و‬DISTINCT‫و‬DISTINCTROW ‫אم‬ ‫א‬ ‫א‬ ª ‫א‬ ‫د‬ ‫א‬ ‫ن‬‫א‬Ø ‫א‬ ‫אد‬ ‫א‬ALL. ‫אول‬ Ğ‫א‬ ‫و‬ ‫ول‬ Ğ‫א‬ ‫ل‬ ğ‫א‬ Ĝ Ħ ‫م‬ ª Ĝ ‫א‬ ‫ل‬ ğ‫א‬ Ģ ‫א‬ ‫ول‬ Ğ‫א‬ ‫א‬ ‫دאد‬Ø ‫א‬ ‫אد‬ ‫א‬ ª ‫א‬ Ĝ ‫א‬ ‫ل‬ ğ‫א‬ Ú ‫د‬ Ø ‫دאد‬Ø ‫א‬ ‫وא‬. ‫وس‬ ‫א‬ ‫א‬ ‫אد‬ ‫א‬ Ú ‫א‬ ‫א‬ ‫א‬ Ú ً ‫ول‬ Ğ‫א‬E. ‫אد‬ ‫א‬ ª ‫א‬ Ĝ ‫א‬ ‫אول‬ Ğ‫א‬ Ú ‫و‬ ‫ول‬ Ğ‫א‬ ‫א‬ ‫ود‬ ‫א‬ ‫אول‬ Ğ‫א‬ Ĝ ‫א‬ ª ‫א‬ ‫א‬ ‫ول‬ Ğ‫א‬)Í ‫ذא‬ª ‫א‬ ‫אول‬ Ğ‫א‬ ‫א‬ ª‫א‬ ‫א‬ ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬ ‫ع‬ Ø ‫א‬ġ Ó‫א‬‫وط‬ Ĝ ‫א‬ ª ‫א‬ ī‫א‬ ‫א‬ ‫א‬ ě ‫م‬ ‫א‬ ‫א‬ ª ‫א‬ ‫א‬ Ù ‫م‬ ‫א‬ ‫א‬ Ğ ‫א‬ ‫א‬Ğ ‫א‬ ‫א‬Ğ ‫א‬ ‫א‬Ğ ‫א‬ ‫א‬FROM ‫العامة‬ ‫الصيغة‬ ‫ن‬SELECT Ğ‫א‬ predicate ‫א‬ ª‫א‬ ‫א‬ ‫אم‬ ‫א‬ ‫ن‬ *‫אول‬ Ğ‫א‬ ‫و‬ ‫ول‬ Ğ‫א‬ ‫ل‬ ğ‫א‬ Ĝ Ħ ‫م‬ tableª Ĝ ‫א‬ ‫ل‬ ğ‫א‬ Ģ ‫א‬ ‫ول‬ Ğ‫א‬ ‫א‬ field1, field2 ‫دאد‬Ø ‫א‬ ‫אد‬ ‫א‬ ª ‫א‬ Ĝ ‫א‬ ‫ل‬ ğ‫א‬ Ú ‫د‬ Ø ‫دאد‬Ø ‫א‬ ‫وא‬ alias1, alias2 ‫وس‬ ‫א‬ ‫א‬ ‫אد‬ ‫א‬ Ú ‫א‬ F‫ول‬ Ğ‫א‬ tableexpression‫אد‬ ‫א‬ ª ‫א‬ Ĝ ‫א‬ ‫אول‬ Ğ‫א‬ Ú ‫و‬ ‫ول‬ Ğ‫א‬ ‫א‬ externaldatabase ‫ود‬ ‫א‬ ‫אول‬ Ğ‫א‬ Ĝ ‫א‬ ª ‫א‬ ‫א‬ ‫ول‬ Ğ‫א‬ ‫א‬ ‫و‬‫א‬ ª‫א‬ ‫א‬
  13. 13. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬١٣‫من‬٦٣ ‫و‬‫و‬‫و‬‫و‬‫א‬‫א‬‫א‬‫א‬‫ط‬ ‫אو‬ Ĝ ‫ون‬ ª ‫א‬‫ط‬ ‫אو‬ Ĝ ‫ون‬ ª ‫א‬‫ط‬ ‫אو‬ Ĝ ‫ون‬ ª ‫א‬‫ط‬ ‫אو‬ Ĝ ‫ون‬ ª ‫א‬ ‫א‬‫ل‬ ğ‫א‬ ‫العامة‬ ‫الصيغة‬ SELECT * FROM ‫الجدول‬ ‫;أسم‬ ‫ل‬‫ل‬‫ل‬‫ل‬ ‫א‬‫م‬ ‫א‬‫ل‬ ğ‫א‬ª ‫وא‬Ę‫ول‬‫א‬ ª‫א‬ Ğ‫א‬ª‫א‬ Ğ‫א‬ª‫א‬ Ğ‫א‬ª‫א‬ Ğ‫א‬ SELECTSELECTSELECTSELECT **** FROMFROMFROMFROM student;;;; ‫א‬‫א‬‫א‬‫א‬
  14. 14. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬١٤‫من‬٦٣ ‫ل‬ ğ‫א‬ ġª ‫א‬ ‫ض‬ ‫و‬‫א‬ ‫م‬ ‫العامة‬ ‫الصيغة‬ SELECT ‫الﺤقل,1الﺤقل‬ 2, … FROM ‫الجدول‬ ‫;أسم‬ ‫مالحظات‬ •‫ل‬ ğ‫א‬‫ون‬ ‫و‬‫א‬‫א‬ Ø ‫א‬‫ول‬ Ğğ‫א‬ ‫א‬K ‫ل‬ ‫א‬‫م‬ ‫א‬‫د‬ ‫א‬ ‫و‬ Ú‫وא‬ ‫א‬ ª‫א‬ Ğ‫א‬ SELECTSELECTSELECTSELECT number,,,, name,,,, bdate FROMFROMFROMFROM student;;;; ‫א‬
  15. 15. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬١٥‫من‬٦٣ ‫م‬ ‫א‬ ğ‫א‬ ‫אن‬ Ù ‫العامة‬ ‫الصيغة‬ SELECT ‫الﺤقل‬ ‫اسم‬ AS ‫الجديد‬ ‫االسم‬ FROM ‫الجدول‬ ‫;أسم‬ ‫مالحظات‬ •‫אول‬ Ğ‫א‬ ‫ل‬ ğ‫א‬ Ú ‫א‬‫א‬K ‫ل‬ ‫א‬‫م‬ ‫א‬number‫و‬ ‫א‬ ‫و‬name‫و‬‫א‬‫و‬ department‫א‬ ‫ول‬ ª‫א‬ Ğ‫א‬ SELECTSELECTSELECTSELECT number ASASASAS [[[[‫الطالب‬ ‫,]رقم‬],],], name ASASASAS ‫,االسم‬,,, department ASASASAS ‫القسم‬ FROMFROMFROMFROM student;;;; ‫א‬
  16. 16. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬١٦‫من‬٦٣ ‫ل‬ ğ‫א‬ ª ‫ل‬ ğ‫א‬ ġ ‫و‬ ‫א‬ ª ‫א‬ ‫אم‬ īK ‫العامة‬ ‫الصيغة‬ SELECT ‫الﺤقل‬ ‫على‬ ‫عملية‬ FROM ‫الجدول‬ ‫;أسم‬ ‫مالحظات‬ •‫א‬‫אول‬ Ğ‫א‬ ‫ل‬ ğ‫א‬‫א‬K •ª Ò‫א‬ ğ‫א‬ĨAS‫ن‬ ‫م‬ Ù ‫א‬ ًÚ‫א‬Expr0000 •‫و‬ ğ‫א‬ ‫ن‬ ğ‫א‬ ‫א‬ ª ‫א‬ ‫א‬ ‫א‬ ī ‫א‬ ğ‫א‬ ª ‫א‬ ‫املعامل‬‫الوصف‬ −−−−‫العدد‬ ‫إشارة‬ ‫تغيري‬ ++++‫الجمع‬)‫رقمني‬ ‫لجمع‬ ‫ستخدم‬ُ‫ت‬( −−−−‫الطرح‬)‫رقمني‬ ‫لطرح‬ ‫ستخدم‬ُ‫ت‬( ∗∗∗∗‫الرضب‬)‫رقمني‬ ‫لرضب‬ ‫ستخدم‬ُ‫ت‬( ////‫القسمة‬)‫رقمني‬ ‫لقسمة‬ ‫ستخدم‬ُ‫ت‬( ^‫ألس‬ ‫رقم‬ ‫لرفع‬ ‫تستخدم‬ ‫ألس‬ ‫الرفع‬ %%%%‫القسمة‬ ‫باقي‬)‫رقمني‬ ‫قسم‬ ‫باقي‬ ‫إلعادة‬ ‫تستخدم‬(
  17. 17. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬١٧‫من‬٦٣ ‫ل‬ ‫א‬‫م‬ ‫א‬‫א‬‫و‬ ª‫א‬ Ğ‫א‬ SELECTSELECTSELECTSELECT number****10,,,, number,,,,name FROMFROMFROMFROM student ;;;; ‫א‬
  18. 18. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬١٨‫من‬٦٣ ًًًً‫א‬‫א‬‫א‬‫א‬ġġġġª ‫א‬ª ‫א‬ª ‫א‬ª ‫א‬‫ط‬‫ط‬‫ط‬‫ط‬ ‫م‬ ª ‫א‬ ª ‫د‬ ġWHERE ‫العامة‬ ‫الصيغة‬ SELECT ‫الحقل,1الحقل‬ 2, … FROM ‫الجدول‬ ‫أسم‬ WHERE ‫الشرط‬‫المؤثر‬‫الحقل‬ ; ‫א‬ ª‫א‬ ‫א‬‫א‬ ‫א‬‫א‬‫א‬‫א‬‫א‬‫א‬‫א‬‫א‬ =‫و‬=‫و‬ ‫و‬ × ‫و‬ ×=‫و‬ ‫و‬ ‫א‬ ‫א‬ ª‫א‬ ‫א‬‫א‬ ª‫א‬ ‫א‬‫א‬ ª‫א‬ ‫א‬‫א‬ ª‫א‬ ‫א‬ ‫א‬ ª‫א‬ ‫ط‬ ‫ن‬ ‫א‬ ‫א‬‫א‬‫א‬‫א‬‫א‬‫א‬‫א‬‫א‬ AND‫و‬OR‫و‬ NOT‫א‬EQV IMPħ ‫د‬XORJ‫و‬ ‫مالحظات‬ •‫א‬ Ø ‫א‬ ‫א‬K •‫א‬ Ħ ‫א‬ •Ħ ‫א‬ Ħ ‫א‬ ‫א‬# # •‫א‬ ‫א‬‫ص‬ o× ‫א‬ ‫ط‬??‫א‬ ‫א‬ o‫ط‬??‫א‬ ‫א‬
  19. 19. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬١٩‫من‬٦٣ ‫ل‬ ‫א‬‫م‬ ‫א‬‫א‬ ‫א‬Z ª‫א‬ Ğ‫א‬ SELECTSELECTSELECTSELECT **** FROMFROMFROMFROM student WHEREWHEREWHEREWHERE number====259090;;;; ‫א‬ ‫ل‬ ‫א‬‫م‬ ‫א‬‫א‬ ‫א‬ ‫א‬ ª ‫א‬Z ª‫א‬ Ğ‫א‬ SELECTSELECTSELECTSELECT **** FROMFROMFROMFROM student WHEREWHEREWHEREWHERE NOTNOTNOTNOT number====259090;;;; SELECTSELECTSELECTSELECT **** FROMFROMFROMFROM student WHEREWHEREWHEREWHERE number259090;;;; ‫א‬
  20. 20. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬٢٠‫من‬٦٣ ‫ل‬ ‫א‬‫م‬ ‫א‬‫א‬ ª ‫א‬ ª‫א‬ Ğ‫א‬ SELECT * FROM student WHERE city= ‫آ‬ ; ‫א‬ ‫ل‬ ‫א‬‫م‬ ‫א‬‫א‬ ª ‫א‬‫وא‬ ‫و‬‫م‬LL ª‫א‬ Ğ‫א‬ SELECTSELECTSELECTSELECT **** FROMFROMFROMFROM student WHEREWHEREWHEREWHERE bdate #1/1/1980#; ‫א‬ ĩ ‫א‬‫م‬ ‫א‬‫א‬ ª ‫א‬‫م‬ ‫وא‬ ‫و‬LL
  21. 21. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬٢١‫من‬٦٣ ‫ل‬ ‫א‬‫م‬ ‫א‬‫א‬ ª ‫א‬‫ن‬ ‫و‬ ª ‫א‬ ª‫א‬ Ğ‫א‬ SELECTSELECTSELECTSELECT **** FROMFROMFROMFROM student WHEREWHEREWHEREWHERE city====‫سكاكا‬ ANDANDANDAND department====2 ‫א‬ ‫ل‬ ‫א‬‫م‬ ‫א‬‫א‬ ª ‫א‬‫ن‬ ‫و‬ ª ‫א‬ ª‫א‬ Ğ‫א‬ SELECTSELECTSELECTSELECT **** FROMFROMFROMFROM student WHEREWHEREWHEREWHERE city====‫سكاكا‬ OROROROR department====2 ‫א‬
  22. 22. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬٢٢‫من‬٦٣ ‫ل‬ ‫א‬‫م‬ ‫א‬‫א‬ ª ‫א‬ Ú‫د‬ ª‫א‬ Ğ‫א‬ SELECTSELECTSELECTSELECT**** FROMFROMFROMFROM student WHEREWHEREWHEREWHERE number ====250000 ANDANDANDAND number ====259999;;;; ‫א‬
  23. 23. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬٢٣‫من‬٦٣ ‫א‬ ª ‫א‬‫אع‬ً ً ‫ن‬ ‫א‬ ‫ل‬ ğ‫א‬ ‫ل‬ ğ‫א‬ Ġ‫א‬ ğ ً‫א‬K ‫م‬ ‫א‬ ‫و‬LIKE‫وא‬‫א‬ ‫ل‬ ğ‫א‬ ‫العامة‬ ‫الصيغة‬ SELECT ‫الحقل,1الحقل‬ 2, … FROM ‫الجدول‬ ‫أسم‬ WHERE ‫الحقل‬ LIKE “‫;“قيمة‬ ‫א‬ ª LIKE‫ز‬ ‫א‬‫א‬‫א‬‫א‬ ?‫وא‬ ú ‫ن‬ *ú ‫ن‬ #‫ن‬FħE ]‫وف‬[‫א‬ ‫د‬ ‫د‬ ú ]‫وف‬[!‫א‬ ‫د‬ Ù ‫د‬ ú ‫مالحظات‬ • Ħ ‫א‬ ‫א‬ • ‫א‬ ‫א‬ ‫ن‬ ‫ن‬ ‫م‬ ‫א‬ ª?‫و‬ ‫א‬‫؟‬‫م‬ ‫א‬ •‫א‬ ‫א‬ ú‫و‬ ğ‫א‬[a-m]ú ‫و‬a ħm •‫ذא‬‫د‬‫א‬‫א‬ ‫ز‬ ‫א‬ ‫א‬? # *Ħ‫אس‬ []‫م‬ [*]
  24. 24. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬٢٤‫من‬٦٣ ‫ل‬ ‫א‬‫م‬ ‫א‬Ú ‫א‬ ª ‫א‬ Úú ę‫م‬ ª‫א‬ Ğ‫א‬ SELSELSELSELECTECTECTECT**** FROMFROMFROMFROM student WHEREWHEREWHEREWHERE name likelikelikelike ‫*م‬;;;; ‫א‬ ‫ل‬ ‫א‬‫م‬ ‫א‬‫ن‬ ‫وא‬ ‫م‬ ú ę ‫ول‬ ‫א‬ Ú ‫א‬ ª ‫א‬ Úú ª‫א‬ Ğ‫א‬ SELECTSELECTSELECTSELECT**** FROMFROMFROMFROM student WHEREWHEREWHEREWHERE name likelikelikelike ‫????????????م‬;;;; ‫א‬ ‫ل‬ ‫א‬‫م‬ ‫א‬‫א‬ ª ‫א‬ ÚÚú ę‫م‬‫د‬ ú ę ‫و‬ ª‫א‬ Ğ‫א‬ SELECTSELECTSELECTSELECT**** FROMFROMFROMFROM student WHEREWHEREWHEREWHERE name likelikelikelike ‫د*م‬;;;; ‫א‬
  25. 25. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬٢٥‫من‬٦٣ ‫ل‬ ‫א‬‫م‬ ‫א‬‫א‬ ª ‫א‬ Ú‫د‬ ª‫א‬ Ğ‫א‬ SELECTSELECTSELECTSELECT**** FROMFROMFROMFROM student WHEREWHEREWHEREWHERE number LIKELIKELIKELIKE 25####;;;; ‫و‬ SELECTSELECTSELECTSELECT**** FROMFROMFROMFROM student WHEREWHEREWHEREWHERE number LIKELIKELIKELIKE 25????;;;; ‫א‬ ĩ ‫א‬‫م‬ ‫א‬‫א‬ ª ‫א‬ Ú‫د‬ğ‫א‬ ‫ن‬ ‫و‬
  26. 26. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬٢٦‫من‬٦٣ ‫ن‬ ª ġĦ Ħ ‫العامة‬ ‫الصيغة‬ SELECT ‫الحقل,1الحقل‬ 2, … FROM ‫الجدول‬ ‫أسم‬ WHERE ‫الحقل‬ BETWEEN ‫الصغرى‬ ‫القيمة‬ AND ‫القي‬‫الكبرى‬ ‫مة‬ ; ‫مالحظات‬ • ‫א‬ ‫ل‬ ğ‫א‬ ‫ن‬BETWEEN‫ل‬ ğ‫א‬ ‫א‬ ‫א‬ ‫ل‬ ‫و‬ ‫א‬ •‫א‬ ‫אم‬ ‫א‬ ī‫אم‬NOT‫ذ‬ NOT BETWEEN‫ن‬‫د‬ª ‫א‬ ‫ل‬ ğ‫א‬ ‫د‬ Ò‫א‬ Ğ‫א‬BETWEENK •ً ‫م‬ ‫א‬ ‫א‬ ×‫אم‬ Ħ Ħ ‫א‬AND •‫ط‬ ‫و‬ ‫ذא‬F–Ù Ø ‫و‬ Eª ‫א‬AND‫و‬OR‫א‬ ª ‫و‬ ‫ل‬ ‫م‬ ‫א‬ ‫א‬Ħ ‫א‬ ª ‫א‬‫و‬ ª‫א‬ Ğ‫א‬ SELECTSELECTSELECTSELECT**** FROMFROMFROMFROM student WHEREWHEREWHEREWHERE number Between 259000 AndAndAndAnd 259900;;;; ‫א‬
  27. 27. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬٢٧‫من‬٦٣ ‫ل‬ ‫م‬ ‫א‬ ‫א‬Ħ ‫د‬ ‫א‬ ‫א‬ ª ‫א‬LL‫و‬LL ª‫א‬ Ğ‫א‬ SELECTSELECTSELECTSELECT **** FROMFROMFROMFROM student WHEREWHEREWHEREWHERE bdate BETWEENBETWEENBETWEENBETWEEN #1/1/1980# AAAANDNDNDND #1/1/1982#; ‫א‬ ĩ ‫م‬ ‫א‬ ‫א‬ª ‫א‬‫א‬‫א‬Ħ ‫د‬ ‫א‬LL‫و‬LL
  28. 28. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬٢٨‫من‬٦٣ ġ Ħ‫א‬ ‫א‬Ø ‫و‬ Ù ‫د‬ ğ ‫العامة‬ ‫الصيغة‬ SELECT ‫الحقل,1الحقل‬ 2, … FROM ‫الجدول‬ ‫أسم‬ WHERE ‫الحقل‬ IN (‫,1قيمة‬ ‫;)…,2قيمة‬ ‫مالحظات‬ •‫ل‬ ‫ن‬‫ن‬IN‫א‬ ‫وא‬ªOR •IN‫א‬ ‫א‬ ‫و‬ ‫א‬ ‫אع‬ ‫ع‬ •‫א‬ ‫אم‬ ‫א‬ īNOT IN‫ن‬‫د‬‫ل‬ ğ‫א‬ ª ‫א‬ ġ ª ‫א‬‫د‬ Ò‫א‬‫س‬ ‫א‬ ‫א‬K •‫ط‬ ‫و‬ ‫ذא‬FEª ‫א‬AND ‫و‬OR‫א‬ ª ‫و‬ ‫ل‬ ‫م‬ ‫א‬ ‫א‬‫א‬ ª ‫א‬‫و‬‫و‬ ª‫א‬ Ğ‫א‬ SELECTSELECTSELECTSELECT **** FROMFROMFROMFROM student WHEREWHEREWHEREWHERE number InInInIn ((((221010,,,,259090,,,,269020);););); ‫א‬ ĩ ‫אم‬IN‫م‬ ‫א‬ ‫א‬‫א‬ ª ‫א‬‫ن‬ ‫و‬ ‫ن‬ ‫ل‬ Ğ‫א‬ ‫دو‬K
  29. 29. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬٢٩‫من‬٦٣ ًًًًª ‫א‬ª ‫א‬ª ‫א‬ª ‫א‬Ħ ØĦ ØĦ ØĦ Ø Øª ‫א‬‫و‬ ę ‫العامة‬ ‫الصيغة‬ SELECT ‫الحقل,1الحقل‬ 2, … FROM ‫الجدول‬ ‫أسم‬ [WHERE ‫]الشروط‬ ORDER BY ‫الحقل,1الحقل‬ 2, … [ASC/DESC]; ‫مالحظات‬ •ASC‫و‬ DESC‫ز‬ •‫א‬Ø ‫وא‬Í ‫ن‬ ‫א‬ •Ø ‫א‬ ‫ع‬ Ĝ‫ع‬ ‫وذ‬ ‫ل‬ ğ‫א‬ ‫ز‬ ‫ن‬ ‫ذא‬ ‫א‬ Ø ‫א‬ •Ø ‫א‬ ‫א‬ ğ‫א‬ ‫ذא‬NULL‫ول‬ ‫م‬ ‫א‬ •WHERE‫و‬ ‫א‬‫ذ‬ ‫م‬ ‫א‬ ‫ن‬ ‫ذא‬ ‫א‬ORDER BY •ħ ‫א‬ ‫א‬ Ø ‫א‬ ‫ن‬ ‫א‬ ‫א‬ ‫אن‬ Ĩ ‫א‬ ‫א‬ ‫א‬ ‫م‬ ‫א‬ ‫א‬ ‫א‬ ‫ن‬ × ‫א‬ ę ً ً ‫א‬ ‫و‬ ‫א‬ً ‫א‬ ħ ً × ‫א‬ Ø ‫א‬ ‫ن‬ ‫د‬K‫وא‬ ‫ز‬ ‫א‬ Ø ‫א‬
  30. 30. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬٣٠‫من‬٦٣ ‫ل‬ ‫م‬ ‫א‬ ‫א‬ª ‫א‬ ªę ً Ę ً‫א‬K ª‫א‬ Ğ‫א‬ SELECTSELECTSELECTSELECT **** FROMFROMFROMFROM student ORDERORDERORDERORDER BYBYBYBY name;;;; ‫א‬ ‫ل‬ ‫م‬ ‫א‬ ‫א‬‫א‬ ªę ‫ز‬ Ę ً‫א‬K ª‫א‬ Ğ‫א‬ SELECTSELECTSELECTSELECT **** FROMFROMFROMFROM teacher ORDERORDERORDERORDER BYBYBYBY name DESCDESCDESCDESC;;;; ‫א‬ ‫ل‬ ‫م‬ ‫א‬ ‫א‬ª ‫א‬ ªęً ‫ز‬Fً‫א‬ ً‫א‬ × ‫א‬E ª‫א‬ Ğ‫א‬ SELECTSELECTSELECTSELECT **** FROMFROMFROMFROM student ORDERORDERORDERORDER BYBYBYBY bdate ASCASCASCASC;;;;
  31. 31. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬٣١‫من‬٦٣ ‫א‬ ĩ ‫م‬ ‫א‬ ‫א‬ª ‫א‬ ªً ęFً‫א‬ × ً‫א‬ ‫א‬E
  32. 32. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬٣٢‫من‬٦٣ Ğ ª ‫א‬ ً ‫א‬Ğ ª ‫א‬ ً ‫א‬Ğ ª ‫א‬ ً ‫א‬Ğ ª ‫א‬ ً ‫א‬SELECT J‫ل‬ ğ‫א‬ ‫العامة‬ ‫الصيغة‬ SELECT ALL ‫الحقل,1الحقل‬ 2, … FROM ‫الجدول‬ ‫أسم‬ [WHERE ‫]الشروط‬ [ORDER BY ‫الحقل,1الحقل‬ 2, … [ASC/DESC] ]; ‫مالحظات‬ •ALL‫א‬ ī ‫א‬Ø ‫א‬ ‫א‬
  33. 33. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬٣٣‫من‬٦٣ J‫ل‬‫د‬n‫وط‬ ‫א‬ ‫א‬ ª ‫א‬ ‫العامة‬ ‫الصيغة‬ SELECT TOP n ‫الحقل,1الحقل‬ 2, … FROM ‫الجدول‬ ‫أسم‬ [WHERE ‫]الشرط‬ ORDER BY ‫ا‬‫لحقل‬ 1,‫الحقل‬ 2, … [ASC/DESC]; ‫مالحظات‬ •Ø ‫א‬ORDER BY‫م‬ ‫א‬ ‫ع‬ ‫א‬ ‫א‬ ت ‫א‬K •‫م‬ ‫א‬ ‫وذ‬ ‫א‬ ‫ط‬ ‫א‬ •‫א‬‫ن‬ ‫א‬ ‫א‬F‫א‬ORDER BYE •ً ً ‫ن‬ ‫ن‬ ‫א‬ ‫ل‬ ‫م‬ ‫א‬ ‫א‬×ً‫א‬ ª ª‫א‬ Ğ‫א‬ SELECTSELECTSELECTSELECT TOP 3 **** FROMFROMFROMFROM student ORDERORDERORDERORDER BYBYBYBY bdate;;;; ‫א‬ ‫ل‬ ‫م‬ ‫א‬ ‫א‬ª‫אد‬ ‫א‬ ª ‫د‬ SELECTSELECTSELECTSELECT TOPTOPTOPTOP 4 * FROMFROMFROMFROM record ORDERORDERORDERORDER BYBYBYBY grade DESCDESCDESCDESC;;;; Ħ ‫و‬ Ħ ‫ن‬ ‫وذ‬ ª ‫د‬ ‫م‬ ‫א‬ª ‫א‬K
  34. 34. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬٣٤‫من‬٦٣ J‫ل‬%n‫وط‬ ‫א‬ ‫א‬ ª ‫א‬ ‫العامة‬ ‫الصيغة‬ SELECT TOP n PERCENT ‫الحقل,1الحقل‬ 2, … FROM ‫الجدول‬ ‫أسم‬ [WHERE ‫]الشرط‬ ORDER BY ‫الحقل,1الحقل‬ 2, … [ASC/DESC]; ‫مالحظات‬ •Ø ‫א‬ORDER BY‫ع‬ ‫א‬ ‫א‬‫م‬ ‫א‬ ت ‫א‬K •ً ً ‫ن‬ ‫ن‬ ‫א‬ •‫א‬ ‫א‬Ħ‫و‬‫و‬‫א‬ ‫ون‬ ‫א‬ ‫א‬K •‫א‬ ‫א‬ª ‫א‬ K •ً •‫ط‬ ‫א‬‫وذ‬ ‫א‬‫ض‬ ‫א‬‫م‬ ‫א‬ • ‫א‬ ‫א‬ ‫ن‬ ‫א‬F‫א‬ORDER BYE ‫ل‬ ‫م‬ ‫א‬ ‫א‬ً‫א‬ ª ‫א‬ ª‫א‬ Ğ‫א‬ SELECTSELECTSELECTSELECT TOP 20 PERCENT **** FROMFROMFROMFROM student ORDERORDERORDERORDER BYBYBYBY bdate;;;; ‫א‬
  35. 35. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬٣٥‫من‬٦٣ Jª ‫א‬F‫א‬E‫א‬ ‫א‬ ‫م‬‫م‬ ‫א‬ ‫و‬ ‫א‬ ª ‫العامة‬ ‫الصيغة‬ SELECT DISTINCT ‫الحقل,1الحقل‬ 2, … FROM ‫الجدول‬ ‫أسم‬ [WHERE ‫]الشرط‬ [ORDER BY ‫الحقل,1الحقل‬ 2, … [ASC/DESC] ]; ‫مالحظات‬ •‫م‬ ‫א‬ ‫وذ‬ ‫א‬ Ø ‫وא‬ ‫ط‬ ‫א‬ • ª ‫א‬ ‫ذא‬SELECT‫وא‬ ‫م‬ ‫א‬‫א‬‫א‬‫ل‬ ğ‫א‬K •‫ل‬ ğ‫א‬ ªØ ‫א‬ ‫ذא‬*ª ‫א‬ ‫م‬ ‫א‬ ‫ن‬ ‫א‬K ‫ل‬ ‫א‬‫א‬ً‫א‬ ‫ون‬ ª ‫א‬ ‫ن‬ Ú ª‫א‬ Ğ‫א‬ SELECTSELECTSELECTSELECT DISTINCTDISTINCTDISTINCTDISTINCT city FROMFROMFROMFROM student;;;; ‫א‬
  36. 36. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬٣٦‫من‬٦٣ J‫א‬ ‫ل‬ ğ‫א‬ ‫و‬ ‫א‬ ª ‫א‬ ‫م‬ ª ‫א‬. ‫א‬ ‫م‬ ‫א‬ ‫و‬ ‫א‬ ª ‫א‬ ě ğ‫א‬‫ل‬ ‫א‬K ‫العامة‬ ‫الصيغة‬ SELECT DISTINCTROW ‫حقل‬١ , ‫حقل‬٢ ,... FROM ‫الجدول‬ ‫أسم‬ [WHERE ‫ا‬‫لشرط‬ ] [ORDER BY ‫الحقل,1الحقل‬ 2, … [ASC/DESC] ]; ‫مالحظات‬ •‫م‬ ‫א‬ ‫وذ‬ ‫א‬ Ø ‫وא‬ ‫ط‬ ‫א‬ •‫ن‬‫ل‬DISTINCTROW‫ل‬ Ĝ Ù ‫م‬ ‫א‬ ‫א‬ ‫אول‬ Ğ‫א‬ ‫و‬K •KěDISTINCTROW‫ول‬ ‫م‬ ‫א‬ ‫א‬ ‫ذא‬‫وא‬ ‫אول‬ Ğ‫א‬ ‫ل‬ ‫אج‬ ‫ذא‬ ‫و‬K •‫م‬W‫ن‬ ‫ن‬ ‫ن‬ ‫م‬ ‫א‬ ‫א‬ ‫و‬ ‫ول‬ ‫م‬ ‫א‬‫ل‬ ğ‫א‬ ‫و‬ ‫ن‬
  37. 37. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬٣٧‫من‬٦٣ ‫وא‬ ‫א‬ ª ‫א‬ ً‫وא‬ ‫א‬ ª ‫א‬ ً‫وא‬ ‫א‬ ª ‫א‬ ً‫وא‬ ‫א‬ ª ‫א‬ ً J‫א‬ ‫م‬ ‫א‬Fª ‫א‬ ‫دوאل‬EAggregate Functions ª ‫א‬ ‫م‬ ‫و‬‫و‬ ‫العامة‬ ‫الصيغة‬ SELECT ‫الحقل(دالة‬ ‫)اسم‬ FROM ‫الجدول‬ ‫أسم‬ [WHERE ‫;]الشروط‬ ‫א‬ ‫وאل‬ ‫א‬ ġ‫و‬ ‫א‬ ‫א‬‫א‬ ‫א‬ SUM‫ع‬ Ó‫א‬ MAX× ‫א‬ MIN COUNT‫א‬ AVG‫א‬ VAR‫א‬ STDEV‫א‬ ú‫א‬ ‫א‬ ‫مالحظات‬ • ª ġ ‫و‬ ‫م‬ ‫א‬ ‫א‬ ‫א‬ ª ‫א‬K •‫אم‬ ‫א‬ ‫א‬Ø ‫א‬ORDER BYK •‫א‬ ‫دوאل‬ ‫د‬ ‫א‬ ğ‫א‬ ‫א‬ •‫א‬ ‫دא‬‫א‬ ‫ذ‬ğ‫א‬‫ل‬ ğ‫א‬ً‫א‬ ‫ل‬ ğ‫א‬ NULLK •‫ذא‬‫א‬ ‫א‬*‫א‬‫א‬COUNT(*)‫ن‬‫א‬ ‫دא‬ ‫א‬ ‫ل‬ ğ‫א‬ ‫ل‬ ğ‫א‬NULLK •ī‫א‬K
  38. 38. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬٣٨‫من‬٦٣ ‫ل‬ ‫א‬ ‫א‬ ‫אد‬ ‫א‬ ‫د‬ ً ‫א‬ ‫א‬ ‫א‬ª‫א‬ Ğ SELECTSELECTSELECTSELECT COUNT((((grade)))) ASASASAS [[[[‫الطالب‬ ‫مواد‬ 2590002]]]] FROMFROMFROMFROM record WHEREWHEREWHEREWHERE st_number====259002;;;; ‫א‬ ‫ل‬ ‫א‬ ª ‫د‬ ‫ع‬ ġ ً ‫א‬ ‫א‬ ª‫א‬ Ğ‫א‬ SELECTSELECTSELECTSELECT SUM((((grade)))) ASASASAS [[[[ ‫مجموع‬‫درجات‬‫الطالب‬ 2590002]]]] FROMFROMFROMFROM record WHEREWHEREWHEREWHERE st_number====259002;;;; ‫א‬ ‫ل‬ ‫د‬ ‫ن‬ ‫א‬ ª ‫א‬ ‫د‬ ً ‫א‬ ‫א‬ ª‫א‬ Ğ‫א‬ SELECTSELECTSELECTSELECT COUNT((((st_number)))) ASASASAS [[[[ ‫عدد‬‫طالب‬‫مادة‬ 335]]]] FROMFROMFROMFROM record WHEREWHEREWHEREWHERE subject ==== 335‫حسب‬;;;; ‫א‬
  39. 39. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬٣٩‫من‬٦٣ ‫ل‬ ª ‫א‬ ‫د‬ ً ‫א‬ ‫א‬‫ن‬ ‫א‬ ‫א‬‫د‬ª ª‫א‬ Ğ‫א‬ SELECTSELECTSELECTSELECT COUNT((((st_number)))) ASASASAS [[[[ ‫عدد‬‫الراسبين‬‫لمادة‬ 200 ‫]عرب‬]]] FROMFROMFROMFROM record WHEREWHEREWHEREWHERE subject ==== 200‫عرب‬ ANDANDANDAND grade60;;;; ‫א‬ ‫ل‬ ‫د‬ ª ‫א‬ ª ‫د‬ ً ‫א‬ ‫א‬ ª‫א‬ Ğ‫א‬ SELECTSELECTSELECTSELECT AVG((((grade)))) ASASASAS [[[[ ‫متوسط‬‫الدرجات‬ ]]]] FROMFROMFROMFROM record WHEREWHEREWHEREWHERE subject ==== 335‫حسب‬;;;; ‫א‬ ‫ل‬ ‫ل‬ ğ‫א‬ Ë ‫د‬ × ً ‫א‬ ‫א‬ ª‫א‬ Ğ‫א‬ SELECTSELECTSELECTSELECT MAX((((grade)))) ASASASAS [[[[ ‫اكبر‬‫درجة‬‫في‬‫مقرر‬ 335‫]حسب‬]]] FROMFROMFROMFROM record WHEREWHEREWHEREWHERE subject ==== 335‫حسب‬;;;; ‫א‬
  40. 40. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬٤٠‫من‬٦٣ ٢-‫א‬ ‫م‬ ‫א‬Grouping Data ‫م‬ ‫و‬ªª ġ ª ‫א‬ ‫م‬ ‫و‬‫א‬ ‫وאل‬ ‫א‬ ġF‫א‬ ‫دوאل‬E ‫العامة‬ ‫الصيغة‬ SELECT ‫التجميع‬ ‫,حقل‬ ‫)حقل(دالة‬ FROM ‫الجدول‬ [WHERE ‫التجميع‬ ‫حقل‬ ‫عدا‬ ‫ما‬ ‫حقول‬ ‫أي‬ ‫على‬ ‫]الشروط‬ GROUP BY ‫التجميع‬ ‫حقل‬ [HAVING ‫التجميع‬ ‫حقل‬ ‫على‬ ‫]الشرط‬ [ORDER BY ‫الحقل,1الحقل‬ 2, … [ASC/DESC] ]; ‫مالحظات‬ •ª ‫א‬ ġ ‫م‬ ‫א‬–Ó‫א‬– •GROUP BY‫א‬ ‫وא‬ ě ‫د‬ ‫و‬ •Ħ ‫د‬ ‫و‬WHERE‫و‬HAVING •‫م‬WHERE‫ذא‬‫ط‬ ‫א‬ ‫א‬‫ط‬ ‫א‬ ‫א‬ ª ‫א‬ ‫א‬ ‫א‬K •‫ط‬ ‫א‬ ‫م‬HAVING‫ذא‬‫ط‬ ‫א‬ ‫א‬‫א‬ً ‫و‬‫א‬ª ‫א‬‫א‬ ‫ط‬ ‫א‬K •‫م‬ ‫א‬ ‫א‬ Ø ‫א‬ ‫אم‬ ‫א‬ ī
  41. 41. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬٤١‫من‬٦٣ ‫ل‬ ‫אد‬ ‫א‬ ‫د‬ ª ‫א‬ ‫د‬ ً ‫א‬ ‫א‬ ª‫א‬ Ğ‫א‬ SELECTSELECTSELECTSELECT subject,,,, COUNT((((st_number)))) ASASASAS [[[[ ‫عدد‬‫الطالب‬ ]]]] FROMFROMFROMFROM record GROUPGROUPGROUPGROUP BYBYBYBY subject;;;; ‫א‬ ĩ ‫אد‬ ‫א‬ ‫د‬ ª ‫א‬ ‫د‬ ً ‫א‬ ‫א‬ً ‫ز‬ ª ‫א‬ ‫د‬ ‫א‬ Ħ ‫ل‬ ª ‫د‬ ‫ع‬ ġ ً ‫א‬ ‫א‬‫אد‬ ‫א‬ ª ‫א‬ ª‫א‬ Ğ‫א‬ SESESESELECTLECTLECTLECT st_number,,,, SUM((((grade)))) asasasas ‫المجموع‬ FROMFROMFROMFROM record GROUPGROUPGROUPGROUP BYBYBYBY st_number;;;; ‫א‬
  42. 42. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬٤٢‫من‬٦٣ ‫ل‬ ً ‫א‬ ‫א‬‫אد‬ ‫א‬ ‫ن‬ ‫א‬ ª ‫א‬ ‫د‬ ª‫א‬ Ğ‫א‬ SELECTSELECTSELECTSELECT subject,,,, COUNT((((st_number)))) ASASASAS [[[[ ‫عدد‬‫الطالب‬ ]]]] FROMFROMFROMFROM record WHEREWHEREWHEREWHERE grade====60 GROUPGROUPGROUPGROUP BYBYBYBY subject;;;; ‫א‬ ‫ل‬ ً ‫א‬ ‫א‬Ħ ª ‫א‬ ‫אد‬ ‫א‬ ‫ن‬ ‫א‬ ‫א‬ ª ‫א‬ ‫د‬‫و‬ ª‫א‬ Ğ‫א‬ SELECTSELECTSELECTSELECT subject,,,, COUNT((((st_number)))) ASASASAS [[[[ ‫عدد‬‫الطالب‬ ]]]] FROMFROMFROMFROM record WHEREWHEREWHEREWHERE grade60 GROUPGROUPGROUPGROUP BYBYBYBY subject HAVINGHAVINGHAVINGHAVING COUNT((((st_number)=)=)=)=2;;;; ‫א‬
  43. 43. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬٤٣‫من‬٦٣ ‫ل‬ ‫א‬ ‫א‬ً‫وא‬ ‫א‬ ‫אد‬ ‫א‬ ª‫א‬ Ğ‫א‬ SELECTSELECTSELECTSELECT subject,,,, COUNT((((st_number)))) ASASASAS [[[[ ‫عدد‬‫الطالب‬ ]]]] FROMFROMFROMFROM record GROUPGROUPGROUPGROUP BYBYBYBY subject HAVINGHAVINGHAVINGHAVING COUNT((((st_number)=)=)=)=1;;;; ‫א‬ ĩ •ً ‫א‬ ‫א‬‫د‬ ‫א‬ ‫אد‬ ‫א‬ •ً ‫א‬ ‫א‬‫א‬ ‫א‬ ‫د‬ ‫א‬ ‫د‬‫ذ‬ •ً ‫א‬ ‫א‬ ‫א‬ ‫د‬
  44. 44. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬٤٤‫من‬٦٣ ‫אول‬ Ğ‫א‬ Ħ ‫وא‬ ‫ول‬ ‫م‬ ‫א‬ ً ‫د‬‫אول‬ Ğ‫א‬ Ħ ‫وא‬ ‫ول‬ ‫م‬ ‫א‬ ً ‫د‬‫אول‬ Ğ‫א‬ Ħ ‫وא‬ ‫ول‬ ‫م‬ ‫א‬ ً ‫د‬‫אول‬ Ğ‫א‬ Ħ ‫وא‬ ‫ول‬ ‫م‬ ‫א‬ ً ‫د‬ ª ‫א‬ Ğ‫א‬ ‫و‬ ‫وא‬ ‫ول‬ ‫א‬ ª ‫א‬ ‫א‬ ‫ن‬ ğ‫א‬ ª ‫א‬ ‫א‬ ‫و‬‫س‬ ‫א‬ ‫ول‬ ª ‫א‬K ً ‫و‬ ‫ل‬ ‫א‬ ‫א‬ ‫ول‬ Ø ‫א‬ ‫ذא‬ ‫א‬ ‫א‬‫و‬‫ود‬ ‫د‬ ‫א‬ ‫אد‬ ‫وא‬ SELECT student.name, student.number, record.subject, record.grade FROM student, record; ‫א‬ ‫ن‬ ‫א‬ ‫م‬ ‫א‬‫א‬Ù ‫ض‬Ø ‫ق‬ ‫א‬ Ù ‫و‬‫ن‬‫ل‬ ً‫د‬K ª ‫א‬ ‫ول‬ ªFªE‫א‬ ‫ول‬ ĘFE‫و‬K ‫א‬ ‫و‬‫א‬ ‫א‬ ‫م‬Cross Join
  45. 45. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬٤٥‫من‬٦٣ ‫א‬ ‫د‬ ‫ذא‬‫א‬?‫א‬? ‫العامة‬ ‫الصيغة‬ SELECT ‫الﺤقول‬ FROM ‫الجدول‬١ , ‫الجدول‬٢ WHERE ‫الجدول‬ ‫في‬ ‫الربط‬ ‫حقل‬١ = ‫الجدول‬ ‫في‬ ‫الربط‬ ‫حقل‬٢ ; ‫مالحظات‬ •‫א‬‫אول‬ Ğ‫א‬ ‫א‬ ‫ل‬ ğ‫א‬ ‫אم‬F‫و‬ ‫א‬ ª ‫א‬ ‫ل‬ Ġ‫א‬ ª ‫א‬E‫و‬‫و‬ ‫ل‬ ‫وא‬ ‫א‬ ‫ل‬ ‫א‬ ‫ن‬Ù ‫א‬K • ‫אول‬ Ğ‫א‬ ‫א‬ ª ‫ذא‬ ‫א‬ ‫ول‬ Ğ‫א‬K •‫א‬ ‫א‬ ً‫א‬ ‫م‬ģ ‫و‬ ‫م‬ ‫א‬ ‫و‬ ‫م‬ ‫ول‬––‫א‬ ‫א‬ ğ‫א‬ ‫ن‬ ğ‫א‬ ‫א‬K‫ول‬ Ğ‫א‬ ‫א‬ Ħ ‫و‬ ‫א‬ ‫د‬ ‫العامة‬ ‫الصيغة‬ SELECTSELECTSELECTSELECT ‫الحقول‬ FROMFROMFROMFROM ‫الجدول‬ 1 ,,,, ‫الجدول‬ 2 ,,,, ‫جدول‬ 3,… WHEREWHEREWHEREWHERE ‫حقل‬‫الربط‬‫في‬‫الجدول‬ 1==== ‫ح‬‫قل‬‫الربط‬‫في‬‫الجدول‬ 2 ANDANDANDAND ‫حقل‬‫الربط‬‫في‬‫الجدول‬ 3==== ‫حقل‬‫الربط‬‫في‬‫الجدول‬ 2 ANDANDANDAND ............ ;;;;
  46. 46. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬٤٦‫من‬٦٣ ‫و‬ ‫אول‬ Ğ‫א‬INNER JOIN ‫العامة‬ ‫الصيغة‬SELECTSELECTSELECTSELECT ‫الحقول‬ FROMFROMFROMFROM 1 ‫الجدول‬ INNERINNERINNERINNER JOINJOINJOINJOIN 2‫الجدول‬ ONONONON ‫حقل‬‫الربط‬‫في‬‫الجدول‬١ ==== ‫حقل‬‫الربط‬‫في‬‫الجدول‬٢ Ħ ‫و‬ ‫العامة‬ ‫الصيغة‬ SELECTSELECTSELECTSELECT ‫الحقول‬ FROMFROMFROMFROM 1‫الجدول‬ INNERINNERINNERINNER JOINJOINJOINJOIN(((( 2‫الجدول‬ INNERINNERINNERINNER JOINJOINJOINJOIN 3‫الجدول‬ ONONONON ‫حقل‬‫الربط‬‫في‬‫الجدول‬٢ ==== ‫حقل‬‫الربط‬‫في‬‫الجدول‬٣ )))) ONONONON ‫حقل‬‫الربط‬‫في‬‫الجدول‬١ ==== ‫حقل‬‫الربط‬‫في‬‫الجدول‬٢ ‫א‬ ‫و‬ ‫مال‬‫حظات‬ •‫و‬ ‫א‬ ‫وط‬ īLØ ‫א‬ ‫א‬ ‫و‬K
  47. 47. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬٤٧‫من‬٦٣ ‫ل‬ ‫א‬ً ‫א‬‫ود‬ ‫د‬ ‫א‬ ‫و‬ ‫و‬ ‫א‬ ‫א‬ ª‫א‬ Ğ‫א‬ SELECTSELECTSELECTSELECT student....name,,,, student....number,,,, record....subject,,,, record....grade FROMFROMFROMFROM student INNERINNERINNERINNER JOINJOINJOINJOIN record ONONONON student....number====record....st_number;;;; ‫و‬ SELECTSELECTSELECTSELECT student....name,,,, student....number,,,, record....subject,,,, record....grade FROMFROMFROMFROM student,,,, record WHEREWHEREWHEREWHERE student....number====record....st_number;;;; ‫א‬ ‫ل‬ ‫א‬ً ‫א‬ª‫א‬ ‫א‬ ª‫א‬ Ğ‫א‬ SELECTSELECTSELECTSELECT dpt....department,,,, courses....id,,,, courses....name FROMFROMFROMFROM dpt INNERINNERINNERINNER JOINJOINJOINJOIN courses ONONONON dpt....id ==== courses....department;;;; ‫و‬ SELECTSELECTSELECTSELECT dpt....department,,,, courses....id,,,, courses....name FROMFROMFROMFROM dpt,,,, courses WHEREWHEREWHEREWHERE dpt....id ==== courses....department;;;;
  48. 48. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬٤٨‫من‬٦٣ ‫א‬ ‫ل‬ ‫א‬ً ‫א‬ ‫ن‬ ‫א‬ ª‫א‬ Ğ‫א‬ SELECTSELECTSELECTSELECT dpt....department,,,, teacher....name FROMFROMFROMFROM dpt,,,, teacher WHEREWHEREWHEREWHERE teacher....deprtment====dpt....id;;;; ‫א‬ ‫ل‬ ‫א‬ً ‫א‬‫د‬ ‫א‬ ‫وא‬ ‫ود‬ ‫د‬ ‫א‬ ‫وא‬ ‫د‬ ‫א‬ ‫و‬ ‫و‬ ‫א‬ ‫א‬ ª‫א‬ Ğ‫א‬ SELECTSELECTSELECTSELECT student....name,,,, student....number,,,, record....subject,,,, courses....name,,,, record....grade,,,, teacher....name FROMFROMFROMFROM student INNERINNERINNERINNER JOINJOINJOINJOIN ((((((((teacher INNERINNERINNERINNER JOINJOINJOINJOIN courses ONONONON teacher....id ==== courses....teacher)))) INNERINNERINNERINNER JOINJOINJOINJOIN record ONONONON courses....id ==== record....subject)))) ONONONON student....number ==== record....st_number;;;;
  49. 49. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬٤٩‫من‬٦٣ ‫و‬ SELECTSELECTSELECTSELECT student....name,,,, student....number,,,, record....subject,,,, courses....name,,,, record....grade,,,, teacher....name FROMFROMFROMFROM student,,,,teacher,,,,courses,,,,record WHEREWHEREWHEREWHERE teacher....id ==== courses....teacher ANDANDANDAND courses....id ==== record....subject ANDANDANDAND student....number ==== record....st_number;;;; ‫א‬ ĩ ‫א‬ً ‫א‬Ú‫ود‬ ‫אد‬ ‫א‬ ‫ز‬ ‫و‬ ‫و‬ ğ‫א‬ ª ‫א‬ ‫א‬ً ‫א‬‫א‬ ‫א‬ Ú ‫و‬ ‫אد‬ ‫א‬ ‫ز‬ ‫و‬ Ú
  50. 50. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬٥٠‫من‬٦٣ Ġ‫א‬ ‫א‬Ġ‫א‬ ‫א‬Ġ‫א‬ ‫א‬Ġ‫א‬ ‫א‬OUTER JOIN ‫א‬ ‫א‬ ‫א‬ F‫א‬ ‫و‬Eª ‫وא‬ ‫א‬ ‫א‬ ‫א‬ ª ‫א‬ Í ‫ذא‬ ‫א‬K Ġ‫א‬ ‫א‬ ‫م‬ ª ‫א‬ ‫ل‬ ğ‫א‬ × ‫א‬ × ‫ن‬ ‫د‬ ‫ذא‬ ‫و‬ OUTER JOIN‫א‬ ‫ول‬ Ğ‫א‬ ‫א‬ ‫א‬ ‫א‬ ‫א‬ ğ‫א‬ ‫و‬F ‫א‬ ‫د‬ ÙE–NULL– Ġ‫א‬ ‫א‬Ġ‫א‬ ‫א‬Ġ‫א‬ ‫א‬Ġ‫א‬ ‫א‬‫א‬‫א‬‫א‬‫א‬LEFT OUTER JOIN ‫ول‬ ‫א‬ ‫ول‬ Ğ‫א‬ ‫د‬ ‫א‬ ª ‫א‬ ‫ن‬F‫م‬ ‫א‬ ‫א‬E ª ‫وא‬ ‫א‬ ‫ول‬ Ğ‫א‬F‫م‬ ‫א‬ ī ‫א‬E‫ول‬ Ğ‫א‬ ‫א‬ ‫ل‬ ğ‫א‬ ‫ن‬ ‫و‬–Ħ ‫א‬–K ‫العامة‬ ‫الصيغة‬SELECTSELECTSELECTSELECT ‫الحقول‬ FROFROFROFROMMMM 1‫الجدول‬ LEFT OUTER JOINLEFT OUTER JOINLEFT OUTER JOINLEFT OUTER JOIN 2‫الجدول‬ ONONONON ‫حقل‬‫الربط‬‫في‬‫الجدول‬‫األول‬ ==== ‫حقل‬‫الربط‬‫في‬‫الجدول‬‫الثاني‬ ‫א‬ Ġ‫א‬ ‫א‬ ‫א‬ Ġ‫א‬ ‫א‬ ‫א‬ Ġ‫א‬ ‫א‬ ‫א‬ Ġ‫א‬ ‫א‬OUTER JOINRIGHT ‫א‬ ‫ول‬ Ğ‫א‬ ‫د‬ ‫א‬ ª ‫א‬ ‫ن‬F‫م‬ ‫א‬ ī ‫א‬E ª ‫وא‬ ‫ول‬ ‫א‬ ‫ول‬ Ğ‫א‬F‫א‬‫م‬ ‫א‬E‫ول‬ Ğ‫א‬ ‫א‬ ‫ل‬ ğ‫א‬ ‫ن‬ ‫و‬–‫א‬–K ‫العامة‬ ‫الصيغة‬SELECTSELECTSELECTSELECT ‫الحقول‬ FROMFROMFROMFROM 1‫الجدول‬ RIGHT OUTER JOINRIGHT OUTER JOINRIGHT OUTER JOINRIGHT OUTER JOIN 2‫الجدول‬ ONONONON ‫حقل‬‫الربط‬‫في‬‫الجدول‬‫األول‬ ==== ‫حقل‬‫الربط‬‫في‬‫الجدول‬‫الثاني‬
  51. 51. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬٥١‫من‬٦٣ ‫ل‬F‫א‬ ‫א‬E ‫א‬‫א‬ً‫א‬ ‫א‬ ‫و‬ ‫אد‬ Í ‫אد‬ ‫א‬ ª‫א‬ Ğ‫א‬ SELECTSELECTSELECTSELECT dpt....department,,,, courses....id,,,, courses....name FROMFROMFROMFROM dpt LEFTLEFTLEFTLEFT OUTEROUTEROUTEROUTER JOINJOINJOINJOIN courses ONONONON dpt....id ==== courses....department;;;; ‫א‬ ‫ل‬F ‫א‬ ‫א‬E ‫א‬ً ‫א‬‫א‬‫و‬‫א‬‫م‬¯‫ون‬ ‫م‬ ª‫א‬ Ğ‫א‬ SELECTSELECTSELECTSELECT teacher....name,,,, dpt....department FROMFROMFROMFROM teacher RIGHTRIGHTRIGHTRIGHT OUTEROUTEROUTEROUTER JOINJOINJOINJOIN dpt ONONONON teacher....deprtment ==== dpt....id;;;; ‫א‬
  52. 52. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬٥٢‫من‬٦٣ ‫א‬ ‫א‬ ‫א‬SELF JOIN ‫ول‬ Ğ‫א‬ ‫م‬ ‫و‬ ‫العامة‬ ‫الصيغة‬SELECTSELECTSELECTSELECT ‫الحقول‬ FROMFROMFROMFROM ‫الجدول‬ ASASASAS ‫اسم‬‫مستعار‬ 1 INNERINNERINNERINNER JOINJOINJOINJOIN ‫الجدول‬ ASASASAS ‫اسم‬‫مستعار‬ 2 ONONONON ‫حقل‬‫الربط‬‫في‬‫الجدول‬١ ==== ‫حقل‬‫الربط‬‫في‬‫الجدول‬٢ ;;;;
  53. 53. ‫صفﺤة‬٥٣‫من‬٦٣ Ħ ‫و‬ ‫و‬ Ħ–‫و‬–Ħ‫א‬ K ‫ول‬ ‫א‬ ‫م‬ ‫א‬ ‫و‬ ‫ول‬ ‫א‬ ‫ول‬ Ğ‫א‬ ª ‫א‬ ‫وא‬ ‫ول‬ ª ‫א‬ ‫ع‬ ‫א‬ ‫م‬ ª ‫א‬F‫م‬ ‫א‬J SELECTSELECTSELECTSELECT ‫الحقول‬ FROMFROMFROMFROM ‫1جدول‬ UNIONUNIONUNIONUNION SELECTSELECTSELECTSELECT ‫الحقول‬ FROMFROMFROMFROM ‫2جدول‬ UNIONUNIONUNIONUNION SELECTSELECTSELECTSELECT ‫الحقول‬ FROMFROMFROMFROM ‫3جدول‬ ... ‫و‬ ‫ن‬ ‫ن‬ ‫ل‬ ğ‫א‬ ‫د‬KF‫ل‬ ğ‫א‬ ‫و‬ ‫م‬ Ø ‫وא‬ ‫ع‬ ‫א‬ ‫ن‬ ‫ن‬ ‫ل‬K Ù ًě ‫و‬ ‫و‬ ‫ل‬ ğ‫א‬ ‫אع‬ ‫א‬ ‫ذא‬K ‫م‬ ‫א‬ ‫א‬ ª ‫א‬ ‫م‬K ‫الخولي‬ ‫المتولي‬ ‫و‬ Ħ ‫و‬ Ħ ‫א‬‫و‬ Ħ ‫و‬ Ħ ‫א‬‫و‬ Ħ ‫و‬ Ħ ‫א‬‫و‬ Ħ ‫و‬ Ħ ‫א‬FFFF‫א‬‫א‬‫א‬‫א‬EEEE UNION ‫א‬ ª ‫א‬ ‫م‬ ‫א‬ ‫م‬ ‫א‬Ħ ‫و‬ ‫و‬ Ħ ‫ول‬ ‫א‬ ‫م‬ ‫א‬ ‫و‬ ‫ول‬ ‫א‬ ‫ول‬ Ğ‫א‬ ª ‫א‬ ‫وא‬ ‫ول‬ ª ‫א‬ ‫ع‬ ‫א‬ ‫م‬ ‫א‬ ‫م‬ ‫א‬ ‫و‬ ‫א‬ ‫ول‬ Ğ‫א‬ ª ‫א‬‫א‬ ‫و‬K ‫א‬ ‫م‬ ‫א‬ ‫ع‬ ‫א‬ ª ‫א‬ ‫ع‬ ‫א‬ ‫א‬ ª ‫א‬ •‫و‬ ‫ن‬ ‫ن‬ ‫ل‬ ğ‫א‬ ‫د‬ Ħ ‫و‬ Ğ‫א‬ K •ğ‫א‬Ø ‫وא‬ ‫ع‬ ‫א‬ ‫ن‬ ‫ن‬ ‫ل‬ Ù ًě ‫و‬ ‫و‬ ‫ل‬ ğ‫א‬ ‫אع‬ ‫א‬ ‫ذא‬ •‫م‬ ‫א‬ ‫א‬ ª ‫א‬ ‫م‬ ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬ ‫م‬ ‫א‬‫م‬ ‫א‬‫م‬ ‫א‬‫م‬ ‫א‬‫و‬ Ħ ‫و‬ Ħ ‫א‬‫و‬ Ħ ‫و‬ Ħ ‫א‬‫و‬ Ħ ‫و‬ Ħ ‫א‬‫و‬ Ħ ‫و‬ Ħ ‫א‬ ‫א‬ ‫م‬ ‫א‬‫א‬ ‫م‬ ‫א‬‫א‬ ‫م‬ ‫א‬‫א‬ ‫م‬ ‫א‬UNION ‫א‬ ª ‫א‬ ‫م‬ ‫א‬ ‫م‬ ‫א‬ ‫ول‬ ‫א‬ ‫م‬ ‫א‬ ‫و‬ ‫ول‬ ‫א‬ ‫ول‬ Ğ‫א‬ ª ‫א‬ ‫وא‬ ‫ول‬ ª ‫א‬ ‫ع‬ ‫א‬ ‫م‬ ‫א‬ ‫م‬ ‫א‬ ‫و‬ ‫א‬ ‫ول‬ Ğ‫א‬ ª ‫א‬ ‫א‬ ‫م‬ ‫א‬ ‫ع‬ ‫א‬ ª ‫א‬ ‫ع‬ ‫א‬ ‫א‬ ª ‫ص‬SQL–E ‫العامة‬ ‫الصيغة‬ ‫مالحظات‬
  54. 54. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬٥٤‫من‬٦٣ ‫ل‬ ‫א‬ً ‫א‬Ħ Ġ‫وא‬ Ħ ğ‫א‬ ª ‫א‬ ً ª‫א‬ Ğ‫א‬ SELECTSELECTSELECTSELECT **** FROMFROMFROMFROM student UNIONUNIONUNIONUNION SELECTSELECTSELECTSELECT **** FROMFROMFROMFROM graduate;;;; ‫א‬
  55. 55. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬٥٥‫من‬٦٣ ‫א‬ ‫م‬ ‫א‬‫א‬ ‫م‬ ‫א‬‫א‬ ‫م‬ ‫א‬‫א‬ ‫م‬ ‫א‬FFFFª‫א‬ ‫א‬ ‫א‬ª‫א‬ ‫א‬ ‫א‬ª‫א‬ ‫א‬ ‫א‬ª‫א‬ ‫א‬ ‫א‬EEEEALLUNION Ħ Ħ ‫و‬ ‫و‬ Ħ ‫א‬ ª ‫א‬ ‫م‬ ‫א‬ ‫م‬ ‫א‬–‫و‬–‫א‬ ‫א‬ ª ‫א‬K ‫א‬ ‫وא‬ ‫ول‬ ª ‫א‬ ‫ع‬ ‫א‬ ‫م‬ª ‫א‬ ‫ول‬ ‫א‬ ‫م‬ ‫א‬ ‫و‬ ‫ول‬ ‫א‬ ‫ول‬ Ğ‫א‬ ª ‫א‬ ‫م‬ ‫א‬ ‫و‬ ‫א‬ ‫ول‬ Ğ‫א‬‫א‬ ‫و‬K ‫العامة‬ ‫الصيغة‬ SELECTSELECTSELECTSELECT ‫الحقول‬ FROMFROMFROMFROM ‫1جدول‬ UNION ALLUNION ALLUNION ALLUNION ALL SELECTSELECTSELECTSELECT ‫الحقول‬ FROMFROMFROMFROM ‫2جدول‬ UNION ALLUNION ALLUNION ALLUNION ALL SELECTSELECTSELECTSELECT ‫الحقول‬ FROMFROMFROMFROM ‫2جدول‬ ... ‫مالحظات‬ •‫و‬ ‫ن‬ ‫ن‬ ‫ل‬ ğ‫א‬ ‫د‬FK‫ل‬ ğ‫א‬ ‫و‬ ‫م‬ Ħ ‫و‬ Ğ‫א‬ K •Ø ‫وא‬ ‫ع‬ ‫א‬ ‫ن‬ ‫ن‬ ‫ل‬ ğ‫א‬K Ù ًě ‫و‬ ‫و‬ ‫ل‬ ğ‫א‬ ‫אع‬ ‫א‬ ‫ذא‬K ‫ل‬ ‫א‬ً ‫א‬‫א‬ ‫ن‬ ‫و‬ Ħ Ġ‫وא‬ Ħ ğ‫א‬ ª ‫א‬ ً ‫א‬ª‫א‬ Ğ SELECTSELECTSELECTSELECT **** FROMFROMFROMFROM student UNION ALLUNION ALLUNION ALLUNION ALL SELECTSELECTSELECTSELECT **** FROMFROMFROMFROM graduate;;;; ‫א‬
  56. 56. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬٥٦‫من‬٦٣ ‫م‬ ‫א‬ Ù ‫و‬ ª ‫א‬SELECT‫م‬‫א‬ ‫و‬ ú ğ‫א‬ ‫و‬‫א‬ ª ‫א‬ ‫ن‬ ª ‫א‬ ‫ن‬ ‫א‬ ‫و‬ ‫ول‬ Ğ ª ‫א‬‫و‬ ú ‫و‬‫د‬ ‫و‬ ª ‫א‬ ‫א‬ ª ‫א‬K ‫ن‬ ú ‫و‬ ú ‫و‬ ‫ل‬ ‫א‬ ª ‫א‬ ‫ن‬ ‫د‬ ‫א‬ ‫وא‬ ‫א‬ ‫م‬ ‫א‬ ğ‫א‬ ‫و‬ ‫א‬‫د‬ ‫א‬ī ‫א‬ ª–‫א‬ ª ‫א‬ ‫א‬ ª ‫ذא‬‫و‬ ً ‫دא‬ ‫אل‬ ‫א‬ –
  57. 57. ‫صفﺤة‬٥٧‫من‬٦٣ ‫و‬ ‫ول‬ ħ ‫و‬ ‫ول‬ ª ‫ق‬ ğ ‫و‬ ‫ول‬ ħ ª ‫م‬K Í ‫ذא‬ ‫و‬Ë ‫א‬ INSERT INTO ‫الجدول‬ [( ‫الحقل‬ ‫اسم‬١ ,٢ VALUES(‫,1حقل‬ , ,...); ‫א‬ ‫ن‬ ‫א‬ ‫א‬ ‫ذא‬ ‫ذא‬ ‫و‬ ‫ل‬ ğ‫א‬ ‫د‬ ‫و‬ ‫א‬ ‫ل‬ ğ‫א‬ ‫א‬ ‫و‬ ‫א‬ ‫ن‬ ğ ‫ل‬ ‫د‬ ‫م‬ ‫د‬ Ġ‫א‬ ‫و‬ ‫א‬ ª ‫א‬ ‫ل‬ ‫ل‬ ‫د‬ ‫א‬ ‫و‬ ‫وא‬ ‫א‬ ‫ل‬ ğ‫א‬ ‫ل‬ ‫د‬ ‫א‬NULLK ‫א‬ INSERT INTO‫د‬ K ‫א‬ ‫و‬ ‫א‬ ‫م‬ ħ INSERTINSERTINSERTINSERT INTOINTOINTOINTO dpt VALUESVALUESVALUESVALUES((((10,,,,‫اإلنجليزية‬ ‫اللغة‬);););); ‫الخولي‬ ‫المتولي‬ ‫ق‬ ğ ‫א‬‫ق‬ ğ ‫א‬‫ق‬ ğ ‫א‬‫ق‬ ğ ‫א‬Append Queries ‫و‬ ‫ول‬ ħ ‫و‬ ‫ول‬ ª ‫ق‬ ğ ‫و‬ ‫ول‬ ħ ª ‫م‬ ª ‫א‬ ‫ع‬ ‫א‬ ‫א‬ ‫و‬Í ‫ذא‬ ‫و‬ ‫م‬ ‫א‬K ª ‫و‬‫ول‬ ħ ‫الحقل‬ ‫اسم‬٢ ,...)] •‫א‬ ‫ن‬ ‫א‬ ‫א‬ ‫ذא‬ ‫و‬ًK •‫ذא‬ ‫و‬ ‫ل‬ ğ‫א‬ ‫د‬ ‫و‬ ‫א‬ ‫ل‬ ğ‫א‬ ‫א‬ ‫و‬ ‫א‬ ‫ن‬ ğ ‫ل‬ ‫د‬ ‫م‬ ‫د‬ KĠ‫א‬ ‫و‬ ‫א‬ ª ‫א‬ ‫ل‬ ‫ل‬ ‫د‬ ‫א‬ ‫و‬ ‫وא‬ ‫א‬ ‫ل‬ ğ‫א‬ ‫ل‬ ‫د‬ ‫א‬ •ī‫א‬ INSERT INTO – VALUES ª ‫א‬ ً ‫א‬ ‫א‬ ‫א‬ ‫א‬‫א‬ ‫و‬ ‫א‬ ‫م‬ ħ ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬ ‫م‬ ‫א‬‫م‬ ‫א‬‫م‬ ‫א‬‫م‬ ‫א‬‫א‬‫א‬‫א‬‫א‬LLLL‫ق‬ ğ ‫א‬‫ق‬ ğ ‫א‬‫ق‬ ğ ‫א‬‫ق‬ ğ ‫א‬ ‫و‬‫و‬ ‫ول‬ ħ ‫و‬ ‫ول‬ ª ‫ق‬ ğ ‫و‬ ‫ول‬ ħ ª ‫م‬ ª ‫א‬ ‫ع‬ ‫א‬ ‫א‬ ‫و‬ ‫م‬ ‫א‬ ‫و‬Lª ‫و‬ ‫العامة‬ ‫الصيغة‬ ‫مالحظات‬ ‫ل‬ ً ‫א‬ ‫א‬ ª‫א‬ Ğ‫א‬
  58. 58. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬٥٨‫من‬٦٣ ‫א‬‫ول‬ ħ ‫ول‬ ª ‫ول‬ ª ‫א‬ ġ ‫א‬ ً ‫و‬ ‫و‬–‫א‬ ‫وط‬ ‫א‬ ęJğ–J ‫ول‬ Ğ ‫العامة‬ ‫الصيغة‬ INSERT INTO ‫الھدف‬ ‫الجدول‬ SELECT * FROM ‫المصدر‬ ‫الجدول‬ [WHERE ‫]الشرط‬ ‫مالحظات‬•Í‫א‬ ‫ول‬ ‫א‬ ª ‫א‬ ú ‫ط‬ ‫و‬ ú ‫א‬ ‫ول‬ ħ •‫د‬ ú ‫א‬ ‫ول‬ Ğ‫א‬ ‫ن‬ ‫ن‬ ‫ل‬ ‫د‬ ª ‫א‬ ً ‫א‬ ‫א‬‫و‬‫ن‬ Ġ‫א‬ ‫ول‬ ħ ª‫א‬ Ğ‫א‬ INSERTINSERTINSERTINSERT INTOINTOINTOINTO graduate SELECTSELECTSELECTSELECT **** FROMFROMFROMFROM student WHEREWHEREWHEREWHERE [[[[number]]]] BETWEEN 220000 ANDANDANDAND 239999;;;;
  59. 59. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬٥٩‫من‬٦٣ ً‫א‬ª‫ول‬ ħ ‫ول‬ ‫و‬‫א‬‫ول‬ ª ‫א‬Ğ‫א‬ ‫א‬ ħ ‫א‬ ª ‫א‬ ‫ق‬ ğ ‫ول‬‫ول‬ Ğ‫א‬K ‫العامة‬ ‫الصيغة‬ SELECT ‫الھدف‬ ‫الجدول‬ ‫سجالت‬ INTO ‫الھدف‬ ‫الجدول‬ FROM ‫الجدول‬‫المصدر‬ ‫مالحظات‬•‫אد‬ ‫א‬ ‫ول‬ Ğ‫א‬ ‫א‬ ‫ول‬ ‫و‬ ‫ذא‬–ú ‫א‬ ‫ول‬ Ğ‫א‬– ‫א‬ ‫א‬ ‫م‬ ‫و‬ ‫م‬ ‫א‬ ú Ğ‫א‬ ª ‫א‬ ‫و‬ ‫ول‬ Ğ‫א‬ ‫א‬ ‫و‬ ĩ ً ‫א‬ ‫א‬‫ول‬saveĝ ‫و‬‫ول‬ ªrecord
  60. 60. ‫صفﺤة‬٦٠‫من‬٦٣ UPDATE ‫الجدول‬ SET ‫الحقل‬ = ‫الجديدة‬ ‫القيمة‬ ‫الحقل‬ = ‫الجديدة‬ ‫القيمة‬ ‫الحقل‬ = ‫الجديدة‬ ‫القيمة‬ [WHERE ‫]الشرط‬ Ğ‫א‬ ª ‫א‬ Ĝ ‫ط‬ Ĝ ÍK Ĝ ª ‫א‬ ً ‫دא‬ ‫ن‬ ‫א‬ ‫و‬ ‫א‬ ‫א‬ ‫ل‬ ‫و‬OK‫ن‬ ‫א‬ ª Í ‫א‬ ‫א‬ Ĝ ‫א‬ Ë ‫א‬ ‫ن‬ Í ‫ذא‬ Í ‫م‬ ‫א‬ ‫ن‬ ª ħ ğ ‫א‬ ª ‫א‬ ‫א‬ ª ‫א‬ Ġ‫א‬ ª ‫א‬ ‫א‬ª ‫ون‬ ‫و‬ ğ ‫א‬ ª ‫א‬ ‫א‬ ‫ل‬ ‫א‬ ª ‫א‬ Ĝ ª ‫א‬ ª ‫א‬ ª ‫א‬‫ل‬ ‫א‬ ‫الخولي‬ ‫المتولي‬ Update Queries Lª ‫א‬ ġ ‫و‬ ‫ن‬ •Ğ‫א‬ ª ‫א‬ Ĝ ‫ط‬ Ĝ Í •Ĝ ª ‫א‬ ً ‫دא‬ ‫ن‬ ‫א‬ ‫و‬ ‫א‬ ‫א‬ ‫ل‬ ‫و‬ ª ‫א‬ ‫د‬ª Í ‫א‬ ‫א‬ Ĝ ‫א‬ ‫و‬ ‫א‬ ‫ط‬K •Ë ‫א‬ ‫ن‬ Í ‫ذא‬ •Í ‫م‬ ‫א‬ ‫ن‬ ª •ħ ğ ‫א‬ ª ‫א‬ ‫א‬ ª ‫א‬ Ġ‫א‬ ª ‫א‬ ‫א‬ ‫א‬ ‫א‬K •‫ون‬ ‫و‬ ğ ‫א‬ ª ‫א‬ ‫א‬ ‫ل‬ ‫א‬ ª ‫א‬ Ĝ ًK • ª ‫א‬ ª ‫א‬ ª ‫א‬ ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬ ‫א‬ ‫م‬ ‫א‬‫א‬ ‫م‬ ‫א‬‫א‬ ‫م‬ ‫א‬‫א‬ ‫م‬ ‫א‬Update Queries ‫م‬ ‫و‬ ‫العامة‬ ‫الصيغة‬ ‫مال‬‫حظات‬
  61. 61. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬٦١‫من‬٦٣ ‫ل‬ Ģ ً ‫א‬ ‫א‬‫א‬‫د‬??ħ?‫ل‬ ġ? ª‫א‬ Ğ‫א‬ UPDATEUPDATEUPDATEUPDATE courses SETSETSETSET name ==== ‫بيسك‬ ‫فجول‬ ‫برمجة‬١ WHEREWHEREWHEREWHERE id====211‫حسب‬;;;; ‫ول‬ ‫א‬courses‫د‬ ‫א‬ ‫ن‬ ‫ل‬ ‫ل‬ ً ‫א‬ ‫א‬‫א‬ ‫د‬‫د‬ ħ ª‫א‬ Ğ‫א‬ UPDATEUPDATEUPDATEUPDATE record SETSETSETSET grade ==== 88 WHEREWHEREWHEREWHERE st_number====269015 ANDANDANDAND subject====414‫حسب‬ ‫ول‬ Ğ ‫א‬recordĜ ‫א‬ ‫ن‬
  62. 62. ‫صفﺤة‬٦٢‫من‬٦٣ DELETE FROM ‫الجدول‬ WHERE ‫;الشرط‬ ª ‫א‬ ً ‫دא‬ ‫ن‬ ‫א‬ ‫و‬ ‫א‬ ‫א‬ ‫ل‬ ‫و‬OK‫ن‬ ‫א‬ Í ‫א‬ ‫א‬ ‫א‬ ª ‫א‬ ‫د‬ª ‫א‬ ËK ª‫ول‬ Ğ‫א‬K ú ğ‫א‬ ħ Ĝ ‫א‬ ‫א‬ ª ‫א‬ ª ‫א‬ úK ú ğ‫א‬ ‫ون‬ ‫و‬ ً Ĝ ‫א‬ ª ‫א‬ úK ú Ĝ ‫א‬ ‫א‬ ª ‫א‬ ª ‫א‬K ‫الخولي‬ ‫المتولي‬ Delete Queries ú ğ ‫م‬ ‫و‬ġ ‫و‬ª ‫א‬ •ª ‫א‬ ً ‫دא‬ ‫ن‬ ‫א‬ ‫و‬ ‫א‬ ‫א‬ ‫ل‬ ‫و‬ Í ‫א‬ ‫א‬ ‫א‬ ª ‫א‬ ‫د‬ ‫و‬ ‫א‬ ‫ط‬K •‫א‬ Ë •ú ً ‫م‬ ͪ •úªú ğ‫א‬ ħ Ĝ ‫א‬ ‫א‬ ª ‫א‬ ª ‫א‬ ú •úªú ğ‫א‬ ‫ون‬ ‫و‬ ً Ĝ ‫א‬ ª ‫א‬ ú •úªú Ĝ ‫א‬ ‫א‬ ª ‫א‬ ª ‫א‬ ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬ ú ğ‫א‬ ‫م‬ ‫א‬ú ğ‫א‬ ‫م‬ ‫א‬ú ğ‫א‬ ‫م‬ ‫א‬ú ğ‫א‬ ‫م‬ ‫א‬Delete Queries ú ğ ‫م‬ ‫و‬ ‫العامة‬ ‫الصيغة‬ ‫مالحظات‬
  63. 63. ‫ﺍﻻﺳﺘﻌﻼﻣﺎﺕ‬ ‫الدسوقي‬‫الخولي‬ ‫المتولي‬‫صفﺤة‬٦٣‫من‬٦٣ ‫ل‬ ‫د‬ ª ú Ģ ً ‫א‬ ‫א‬‫و‬Ë ‫א‬Ħ Ġ‫א‬ ‫ول‬ ĞJ‫م‬ ‫א‬ ‫ق‬ ğ ‫א‬J ª‫א‬ Ğ‫א‬ DELETEDELETEDELETEDELETE **** FROMFROMFROMFROM student WHEREWHEREWHEREWHERE number BETWEEN 220000 ANDANDANDAND 229999;;;; ‫و‬ DELETEDELETEDELETEDELETE FROMFROMFROMFROM student WHEREWHEREWHEREWHERE number BETWEEN 220000 ANDANDANDAND 229999;;;; ‫ول‬ ‫א‬ ‫م‬ ‫א‬student‫א‬ªĦ ú

×