The syntax is the same as that for other SQL database tutorials, as shown in the following DELETEFROMCOURSESWHERECOURSE_DESIGNATERJava110 Method for performing complex operations by condition (2006-02-1500: 00: 00, YYYY-MM-
The syntax is the same as that of other SQL database tutorials, the following delete from courses where COURSE_DESIGNATER = 'java110 'is a complex operation method: delete from classconvenings where CLASSES_NUM_FK 4 AND CLASS_CONVENE_DATE = TO_DATE ('2017-02-15 00:00:00 ', 'yyyy-MM-
The syntax is the same as that of other SQL database tutorials.
DELETE FROM COURSES
WHERE COURSE_DESIGNATER = 'java110'
Complex operations by conditions
DELETE FROM CLASSCONVENINGS
WHERE CLASSES_NUM_FK> 4
AND CLASS_CONVENE_DATE = TO_DATE ('2017-02-15 00:00:00 ',
'Yyyy-MM-DD HH24: MI: ss ')
AND CLASS_LOCATION_FK = 'seattle-Training Room 1'
Next, let's look at a detailed instance.
SQL> -- create demo table
SQL> create table Employee (
2 ID VARCHAR2 (4 BYTE) not null,
3 First_Name VARCHAR2 (10 BYTE ),
4 Last_Name VARCHAR2 (10 BYTE ),
5 Start_Date DATE,
6 End_Date DATE,
7 Salary Number (8, 2 ),
8 City VARCHAR2 (10 BYTE ),
9 Description VARCHAR2 (15 bytes)
10)
11/
Table created.
SQL>
SQL> -- prepare data
SQL> insert into Employee (ID, First_Name, Last_Name, Start_Date, End_Date, Salary, City, Description)
2 values ('01 ', 'jason', 'martin ', to_date ('20170101', 'yyyymmdd'), to_date ('20170101', 'yyyymmdd'), 19960725, 'toronto ', 'programmer ')
3/
1 row created.
SQL> insert into Employee (ID, First_Name, Last_Name, Start_Date, End_Date, Salary, City, Description)
2 values ('02 ', 'alison', 'mathews ', to_date ('20170101', 'yyyymmdd'), to_date ('20170101', 'yyyymmdd'), 19760321, 'vancouver ', 'tester ')
3/
1 row created.
SQL> insert into Employee (ID, First_Name, Last_Name, Start_Date, End_Date, Salary, City, Description)
2 values ('03', 'James ', 'Smith', to_date ('20170101', 'yyyymmdd'), to_date ('20170101', 'yyyymmdd'), 19781212, 'vancouver ', 'tester ')
3/
1 row created.
SQL> insert into Employee (ID, First_Name, Last_Name, Start_Date, End_Date, Salary, City, Description)
2 values ('04 ', 'cela', 'Rice', to_date ('20170101', 'yyyymmdd'), to_date ('20170101', 'yyyymmdd'), 19821024, 'vancouver ', 'manager ')
3/
1 row created.
SQL> insert into Employee (ID, First_Name, Last_Name, Start_Date, End_Date, Salary, City, Description)