SlideShare une entreprise Scribd logo
1  sur  3
‫תרגול‬‫פרק‬7–DML
1.‫צרו‬‫את‬‫טבלת‬Students‫ע‬"‫י‬‫העתקת‬‫הקוד‬‫הבא‬:
CREATE TABLE students
(studnet_id number(5) PRIMARY KEY,
student_name varchar2(25),
student_class varchar2(25) ,
student_birthday date ,
student_city varchar2(25) DEFAULT 'Tel Aviv')
2.‫להלן‬‫נתונים‬‫בהם‬‫יש‬‫להשתמש‬‫בתרגילים‬‫הבאים‬:
Student_idStudent_nameStudent_classStudent_birthdayStudent_city
1MosheA01-JAN-1994Tel Aviv
2YossiA01-FEB-1994Tel Aviv
3GilBNULLTel Aviv
4YuvalB09-DEC-1995Ramat Gan
5ShmuelBNULLRamat Gan
6AviANULLTel Aviv
7SnirA12-NOV-1995Tel Aviv
8AmirC12-SEP-1998Tel Aviv
9RoeeC17-APR-1994Ramat Gan
3.‫הכניסו‬‫את‬3‫התלמידים‬‫הראשונים‬‫ע‬"‫י‬Implicit Insert,‫במקום‬‫לרשום‬‫את‬‫שם‬‫העיר‬‫השתמשו‬‫ב‬-
DEFAULT.
4.‫הכניסו‬‫את‬3‫התלמידים‬‫הבאים‬‫ע‬"‫י‬Explicit Insert.
5.‫הכניסו‬‫את‬3‫התלמידים‬‫האחרונים‬‫ע‬"‫י‬‫משתני‬‫החלפה‬)Explicit‫או‬Implicit–‫לבחירתכם‬.(
6.‫עדכנו‬‫את‬‫תאריך‬‫לידתו‬‫של‬‫תלמיד‬‫מספר‬5‫ל‬SYSDATE.
7.‫עדכנו‬‫את‬‫עירו‬‫של‬‫תלמיד‬‫מספר‬7‫ל‬-Holon.
8.‫מחקו‬‫את‬‫תלמידים‬2,4,6.
9.‫שמרו‬‫את‬‫הנתונים‬‫באופן‬‫סופי‬‫ב‬-Data Base.
‫פתרונות‬‫תרגול‬‫פרק‬7–DML
CREATE TABLE students
(student_id number(5) PRIMARY KEY,
student_name varchar2(25),
student_class varchar2(25) ,
student_birthday date ,
student_city varchar2(25) DEFAULT 'Tel Aviv')
-------------------
3.
INSERT INTO students
VALUES (1 , 'Moshe' , 'A' , '01-JAN-1994' , DEFAULT)
INSERT INTO students
VALUES (2 , 'Yossi' , 'A' , '01-FEB-1994' ,DEFAULT)
INSERT INTO students
VALUES (3 , 'Gil' ,'B' , NULL , DEFAULT)
4.
INSERT INTO students (student_id , student_name ,
student_class , student_birthday , student_city)
VALUES(4 , 'Yuval' , 'B' , '09-DEC-1995', 'Ramat Gan')
INSERT INTO students (student_id , student_name ,
student_class , student_birthday , student_city)
VALUES(5 , 'Shmuel' , 'B' , NULL , 'Ramat Gan')
INSERT INTO students (student_id , student_name , student_class )
VALUES (6 , 'Avi' , 'A')
5.
INSERT INTO students
VALUES (&s_id , '&s_name' , '&s_class' , '&s_birthday' , '&student_city')
6.
UPDATE students
SET student_birthday = SYSDATE
WHERE student_id = 5
7.
UPDATE students
SET student_city = 'Holon'
WHERE student_id = 7
8.
DELETE FROM students
WHERE student_id IN (2,4,6)
9.
COMMIT
‫ע‬ ‫נכתב‬"‫קדם‬ ‫רם‬ ‫י‬
ram.kdm@gmail.com

Contenu connexe

En vedette

En vedette (15)

Lesson 3 backup
Lesson 3   backupLesson 3   backup
Lesson 3 backup
 
SSRS Gauges
SSRS GaugesSSRS Gauges
SSRS Gauges
 
SSAS Attributes
SSAS AttributesSSAS Attributes
SSAS Attributes
 
Control Flow Using SSIS
Control Flow Using SSISControl Flow Using SSIS
Control Flow Using SSIS
 
SSRS Matrix
SSRS MatrixSSRS Matrix
SSRS Matrix
 
Data mining In SSAS
Data mining In SSASData mining In SSAS
Data mining In SSAS
 
Data Warehouse Design Considerations
Data Warehouse Design ConsiderationsData Warehouse Design Considerations
Data Warehouse Design Considerations
 
SSIS Basic Data Flow
SSIS Basic Data FlowSSIS Basic Data Flow
SSIS Basic Data Flow
 
MSSQL Server - Automation
MSSQL Server - AutomationMSSQL Server - Automation
MSSQL Server - Automation
 
2R Solution Limited
2R Solution Limited2R Solution Limited
2R Solution Limited
 
3 indexes
3 indexes3 indexes
3 indexes
 
The Challenge of Bringing FEZ to PlayStation Platforms
The Challenge of Bringing FEZ to PlayStation PlatformsThe Challenge of Bringing FEZ to PlayStation Platforms
The Challenge of Bringing FEZ to PlayStation Platforms
 
Bridging the Divide - A Social Media Workshop
Bridging the Divide - A Social Media Workshop Bridging the Divide - A Social Media Workshop
Bridging the Divide - A Social Media Workshop
 
Lesson 5 security
Lesson 5   securityLesson 5   security
Lesson 5 security
 
Exploring Oracle Database Architecture (Hebrew)
Exploring Oracle Database Architecture (Hebrew)Exploring Oracle Database Architecture (Hebrew)
Exploring Oracle Database Architecture (Hebrew)
 

Plus de Ram Kedem (14)

Impala use case @ edge
Impala use case @ edgeImpala use case @ edge
Impala use case @ edge
 
Advanced SQL Webinar
Advanced SQL WebinarAdvanced SQL Webinar
Advanced SQL Webinar
 
Managing oracle Database Instance
Managing oracle Database InstanceManaging oracle Database Instance
Managing oracle Database Instance
 
SQL Injections - Oracle
SQL Injections - OracleSQL Injections - Oracle
SQL Injections - Oracle
 
Introduction to SQL
Introduction to SQLIntroduction to SQL
Introduction to SQL
 
Introduction to Databases
Introduction to DatabasesIntroduction to Databases
Introduction to Databases
 
Deploy SSRS Project - SQL Server 2014
Deploy SSRS Project - SQL Server 2014Deploy SSRS Project - SQL Server 2014
Deploy SSRS Project - SQL Server 2014
 
SSAS Cubes & Hierarchies
SSAS Cubes & HierarchiesSSAS Cubes & Hierarchies
SSAS Cubes & Hierarchies
 
SSRS Conditional Formatting
SSRS Conditional FormattingSSRS Conditional Formatting
SSRS Conditional Formatting
 
SSRS Calculated Fields
SSRS Calculated FieldsSSRS Calculated Fields
SSRS Calculated Fields
 
SSRS Groups
SSRS GroupsSSRS Groups
SSRS Groups
 
Deploy SSIS
Deploy SSISDeploy SSIS
Deploy SSIS
 
SSIS Data Flow Tasks
SSIS Data Flow Tasks SSIS Data Flow Tasks
SSIS Data Flow Tasks
 
Data Warehouse Basics
Data Warehouse BasicsData Warehouse Basics
Data Warehouse Basics
 

Dernier

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Dernier (20)

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

DML Practice (Hebrew)

  • 1. ‫תרגול‬‫פרק‬7–DML 1.‫צרו‬‫את‬‫טבלת‬Students‫ע‬"‫י‬‫העתקת‬‫הקוד‬‫הבא‬: CREATE TABLE students (studnet_id number(5) PRIMARY KEY, student_name varchar2(25), student_class varchar2(25) , student_birthday date , student_city varchar2(25) DEFAULT 'Tel Aviv') 2.‫להלן‬‫נתונים‬‫בהם‬‫יש‬‫להשתמש‬‫בתרגילים‬‫הבאים‬: Student_idStudent_nameStudent_classStudent_birthdayStudent_city 1MosheA01-JAN-1994Tel Aviv 2YossiA01-FEB-1994Tel Aviv 3GilBNULLTel Aviv 4YuvalB09-DEC-1995Ramat Gan 5ShmuelBNULLRamat Gan 6AviANULLTel Aviv 7SnirA12-NOV-1995Tel Aviv 8AmirC12-SEP-1998Tel Aviv 9RoeeC17-APR-1994Ramat Gan 3.‫הכניסו‬‫את‬3‫התלמידים‬‫הראשונים‬‫ע‬"‫י‬Implicit Insert,‫במקום‬‫לרשום‬‫את‬‫שם‬‫העיר‬‫השתמשו‬‫ב‬- DEFAULT. 4.‫הכניסו‬‫את‬3‫התלמידים‬‫הבאים‬‫ע‬"‫י‬Explicit Insert. 5.‫הכניסו‬‫את‬3‫התלמידים‬‫האחרונים‬‫ע‬"‫י‬‫משתני‬‫החלפה‬)Explicit‫או‬Implicit–‫לבחירתכם‬.( 6.‫עדכנו‬‫את‬‫תאריך‬‫לידתו‬‫של‬‫תלמיד‬‫מספר‬5‫ל‬SYSDATE. 7.‫עדכנו‬‫את‬‫עירו‬‫של‬‫תלמיד‬‫מספר‬7‫ל‬-Holon. 8.‫מחקו‬‫את‬‫תלמידים‬2,4,6. 9.‫שמרו‬‫את‬‫הנתונים‬‫באופן‬‫סופי‬‫ב‬-Data Base.
  • 2. ‫פתרונות‬‫תרגול‬‫פרק‬7–DML CREATE TABLE students (student_id number(5) PRIMARY KEY, student_name varchar2(25), student_class varchar2(25) , student_birthday date , student_city varchar2(25) DEFAULT 'Tel Aviv') ------------------- 3. INSERT INTO students VALUES (1 , 'Moshe' , 'A' , '01-JAN-1994' , DEFAULT) INSERT INTO students VALUES (2 , 'Yossi' , 'A' , '01-FEB-1994' ,DEFAULT) INSERT INTO students VALUES (3 , 'Gil' ,'B' , NULL , DEFAULT) 4. INSERT INTO students (student_id , student_name , student_class , student_birthday , student_city) VALUES(4 , 'Yuval' , 'B' , '09-DEC-1995', 'Ramat Gan') INSERT INTO students (student_id , student_name , student_class , student_birthday , student_city) VALUES(5 , 'Shmuel' , 'B' , NULL , 'Ramat Gan') INSERT INTO students (student_id , student_name , student_class ) VALUES (6 , 'Avi' , 'A') 5. INSERT INTO students VALUES (&s_id , '&s_name' , '&s_class' , '&s_birthday' , '&student_city')
  • 3. 6. UPDATE students SET student_birthday = SYSDATE WHERE student_id = 5 7. UPDATE students SET student_city = 'Holon' WHERE student_id = 7 8. DELETE FROM students WHERE student_id IN (2,4,6) 9. COMMIT ‫ע‬ ‫נכתב‬"‫קדם‬ ‫רם‬ ‫י‬ ram.kdm@gmail.com