ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
????????????7¨CDML
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¨C??????????.(
6.??????????????????????????????????????????5???SYSDATE.
7.??????????????????????????????????7???-Holon.
8.???????????????????2,4,6.
9.???????????????????????????????????-Data Base.
?????????????????????7¨CDML
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

More Related Content

DML Practice (Hebrew)

  • 1. ????????????7¨CDML 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¨C??????????.( 6.??????????????????????????????????????????5???SYSDATE. 7.??????????????????????????????????7???-Holon. 8.???????????????????2,4,6. 9.???????????????????????????????????-Data Base.
  • 2. ?????????????????????7¨CDML 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