TAILIEUCHUNG - Managing Data and Concurrency

After completing this lesson, you should be able to do the following: • Manage data through the use of SQL • Identify and administer PL/SQL objects • Describe triggers and triggering events • Monitor and resolve locking conflicts | Managing Data and Concurrency Objectives After completing this lesson, you should be able to do the following: Manage data through the use of SQL Identify and administer PL/SQL objects Describe triggers and triggering events Monitor and resolve locking conflicts Manipulating Data Through SQL . SQL> INSERT INTO employees VALUES 2 (9999,'Bob','Builder','bob@',NULL,SYSDATE, 3 'IT_PROG',NULL,NULL,100,90); 1 row created. SQL> UPDATE employees SET SALARY=6000 2 WHERE EMPLOYEE_ID = 9999; 1 row updated. SQL> DELETE from employees 2 WHERE EMPLOYEE_ID = 9999; 1 row deleted. > SQL PL/SQL Locks Manipulating Data Through SQL The basic data manipulation language (DML) statements are the way data is manipulated in the database. Although these statements are briefly mentioned in the lesson titled “Moving Data,” they are covered in more detail in this lesson. The INSERT Command Create one row at a time. Insert many rows from another table. The INSERT Command The basic INSERT statement creates one row at a time. Using what is called a subselect, you can cause the INSERT command to copy rows from one table to another. This method is also referred to as an INSERT SELECT statement. The example in the slide is the following INSERT command: insert into dept_80 (select * from employees where department_id = 80); In this case, the dept_80 table has exactly the same structure as the employees table. If this is not the case, you can name the columns in each table. The values selected in the SELECT statement are associated with the columns of the table being inserted into, respectively. The column values match in the order as named in the INSERT and SELECT statements. All that is required is that the data types match. For example: insert into just_names (first, last) (select first_name, last_name from employees); Here, the just_names table has only two columns that have the same data type as the first_name and last_name columns in the employees table. Using the INSERT SELECT method is

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.