0

language structured query language pl sql

Chương 2 SQL (Structured Query Language)

Chương 2 SQL (Structured Query Language)

Cao đẳng - Đại học

... hệ Chuẩn ANSI SQL công bố vào năm 1989, 1992 1999 Đặc điểm SQL: Ngôn ngữ tựa tiếng Anh Ngôn ngữ phi thủ tục Gồm nhóm lệnh: DDL (Data Definition Language) DML (Data Manipulation Language) DCL ... expression [NOT] IN (subquery) WHERE expression comparison_operator [ANY | ALL] (subquery) WHERE [NOT] EXISTS (subquery) 35NN HCSDL 35 Subqueries với toán tử IN Kết subquery dùng với IN (hay với ... (Data Control Language) 2NN HCSDL DDL (Data Definition Language) DDL ngôn ngữ định nghĩa liệu gồm lệnh CREATE/ALTER/DROP DATABASE CREATE/ALTER/DROP TABLE 3NN HCSDL DML (Data Manipulation Language) ...
  • 44
  • 347
  • 0
bài 4 sql (structured query language)

bài 4 sql (structured query language)

Kỹ thuật lập trình

... TRƯỜNG ĐẠI HỌC KHOA HỌC TỰ NHIÊN TP.HCM TRUNG TÂM TIN HỌC SQL (STRUCTURED QUERY LANGUAGE) TRƯỜNG ĐẠI HỌC KHOA HỌC TỰ NHIÊN TP.HCM TRUNG TÂM TIN HỌC Lệnh truy vấn liệu ... TRUNG TÂM TIN HỌC Một số lưu ý viết câu lệnh SQL • • • Câu lệnh SQL không phân biệt chữ hoa, chữ thường • Các mệnh đề khác nên đặt dòng khác Câu lệnh SQL viết nhiều dòng Các từ khóa không viết...
  • 42
  • 381
  • 0
SQL (Structured Query Language) (tiếp theo) docx

SQL (Structured Query Language) (tiếp theo) docx

Cơ sở dữ liệu

... name from Employee where gender = 'male' intersect ( select id, name from Employee where dob < '1980-01-01' except ( select id, name from Employee where level = )); Chú ý:   11 Trong MySQL không ... mà phải dùng câu lệnh lồng MSSQL dùng “minus” thay “except” EE4509, EE6133 – HK2 2011/2012 TS Đào Trung Kiên – ĐH Bách khoa Hà Nội Câu lệnh lồng (nested queries)   SQL cho phép sử dụng câu lệnh ... >= EE4509, EE6133 – HK2 2011/2012 TS Đào Trung Kiên – ĐH Bách khoa Hà Nội Gộp kết   Phép hợp SQL thực cú pháp: select … union select … Chú ý:      Kết phép select phải tương thích với...
  • 19
  • 248
  • 0
SQL structured query language

SQL structured query language

Cơ sở dữ liệu

... information with a certain condition – SQL is a query language that allows user to specify the conditions (instead of algorithms) Introduction to SQL Concept of SQL – The user specifies a certain ... – The result of the query will then be stored in form of a table 1 Introduction to SQL How to involve SQL in FoxPro – Before using SQL, the tables should be opened – The SQL command can be entered ... 1 Introduction to SQL What is SQL? – When a user wants to get some information from a database file, he can issue a query – A query is a user–request to retrieve data or...
  • 68
  • 362
  • 0
SQL tutorials structured query language

SQL tutorials structured query language

Cơ sở dữ liệu

... Manipulation Language (DML) SQL (Structured Query Language) is a syntax for executing queries But the SQL language also includes a syntax to update, insert, and delete records These query and update commands ... database SQL works with database programs like MS Access, DB2, Informix, MS SQL Server, Oracle, Sybase, etc Unfortunately, there are many different versions of the SQL language, but to be in compliance ... can query a database and have a result set returned A query like this: SELECT LastName FROM Persons Gives a result set like this: LastName Hansen Svendson Pettersen SQL Data Manipulation Language...
  • 34
  • 307
  • 0
Bài giảng cơ sở dữ liệu   chương 5  SQL (structured query language)

Bài giảng cơ sở dữ liệu chương 5 SQL (structured query language)

Cơ sở dữ liệu

... Giới thiệu ƒ Ngôn ngữ ĐSQH - Cách thức truy vấn liệu - Khó khăn cho người sử dụng ƒ SQL (Structured Query Language) - Ngôn ngữ cấp cao - Người sử dụng cần đưa nội dung cần truy vấn - Được phát ... gọi SEQUEL - Được ANSI công nhận phát triển thành chuẩn y SQL- 86 y SQL- 92 y SQL- 99 Cơ sở liệu - Khoa ĐT-TH - CĐ KTCN-ĐN Giới thiệu (tt) ƒ SQL gồm - Định nghĩa liệu (DDL) - Thao tác liệu (DML) - ... mật - Điều khiển giao tác ƒ SQL sử dụng thuật ngữ - Bảng ~ quan hệ - Cột ~ thuộc tính - Dòng ~ Cơ sở liệu - Khoa ĐT-TH - CĐ KTCN-ĐN Lý thuyết : Chuẩn SQL- 92 Ví dụ : SQL Server Nội dung chi tiết...
  • 24
  • 235
  • 0
Oracle PL/SQL Language Pocket Reference- P5

Oracle PL/SQL Language Pocket Reference- P5

Cơ sở dữ liệu

... arise in your application The following sections look at how you define, raise, and handle exceptions in PL/ SQL Previous: 7.7 Tips for PL/ SQL Loops 7.7 Tips for PL/ SQL Loops Oracle PL/ SQL Programming, ... different PL/ SQL programs even between client and server PL/ SQL programs Prior to PL/ SQL Release 2.3, you would have had to fetch all data from the cursor, store it in PL/ SQL variables (perhaps a PL/ SQL ... host language Because the focus of this book is on standalone PL/ SQL development, I present cursor variables as a PL/ SQL Release 2.3 enhancement If you have PL/ SQL Release 2.2 and work with PL/ SQL...
  • 50
  • 379
  • 0
Oracle PL/SQL Language Pocket Reference- P6

Oracle PL/SQL Language Pocket Reference- P6

Cơ sở dữ liệu

... through SQL cursor attributes The SQL cursor has the same four attributes as an explicit cursor: SQL% FOUND SQL% NOTFOUND SQL% ROWCOUNT SQL% ISOPEN 6.9.6 Differences Between Implicit and Explicit ... about the most recently executed SQL statement by examining the values in the implicit SQL cursor attributes, as explained later in this chapter PL/ SQL employs an implicit cursor for each UPDATE, ... Implicit and Explicit Cursors Let's take a closer look at implicit and explicit cursors and the ways you can put them in your programs 6.3.1 Implicit Cursors PL/ SQL issues an implicit cursor whenever...
  • 50
  • 348
  • 0
Oracle PL/SQL Language Pocket Reference- P7

Oracle PL/SQL Language Pocket Reference- P7

Cơ sở dữ liệu

... constant in an inappropriate manner PL/ SQL table TYPE In PL/ SQL Version you can create PL/ SQL tables which are similar to one-dimensional arrays In order to create a PL/ SQL table, you must first execute ... lots of options in PL/ SQL for executing SQL, and all of them occur as some type of cursor Generally, there are two types of SQL that you can execute in PL/ SQL: static and dynamic SQL is static if ... Variables Working with Cursors PL/ SQL is tightly integrated with the Oracle database via the SQL language From within PL/ SQL, you can execute any DML (data manipulation language) statements, including...
  • 50
  • 419
  • 0
Oracle PL/SQL Language Pocket Reference- P8

Oracle PL/SQL Language Pocket Reference- P8

Cơ sở dữ liệu

... how often PL/ SQL is performing conversions on your behalf Figure 4.1 shows what kinds of implicit conversions PL/ SQL can perform Figure 4.1: Implicit conversions performed by PL/ SQL Please purchase ... RDBMS /SQL language offers features not found in PL/ SQL, such as the Oracle SQL DECODE construct PL/ SQL, on the other hand, has a few tricks up its sleeve which are unavailable in native SQL One ... Previous: 4.3 NULLs in PL/ SQL 4.3 NULLs in PL/ SQL Oracle PL/ SQL Programming, 2nd Edition Book Index Next: 4.5 Anchored Declarations 4.5 Anchored Declarations Please purchase PDF Split-Merge on www.verypdf.com...
  • 50
  • 379
  • 0
Oracle PL/SQL Language Pocket Reference- P9

Oracle PL/SQL Language Pocket Reference- P9

Cơ sở dữ liệu

... Formatting Control Structures 3.2 Formatting SQL Statements Because PL/ SQL is an extension to the SQL language, you can place SQL statements directly in your PL/ SQL programs You can also define cursors ... fundamental language rules that will help you converse with the PL/ SQL compiler the PL/ SQL character set, lexical units, PRAGMA keyword, and block structure 2.1 The PL/ SQL Character Set A PL/ SQL program ... reserved Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark Previous: 1.6 A Few of My Favorite (PL/ SQL) Things Chapter Introduction to PL/ SQL Next: PL/ SQL Language Fundamentals...
  • 50
  • 353
  • 0
Oracle PL/SQL Language Pocket Reference- P10

Oracle PL/SQL Language Pocket Reference- P10

Cơ sở dữ liệu

... two versions of PL/ SQL: q q PL/ SQL Release 1.1: a client-side PL/ SQL engine that allows the application to execute local PL/ SQL programs PL/ SQL Release 2.X: the server-based PL/ SQL engine that ... call Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark interface of the program has changed 1.4.7 PL/ SQL Version 8.0 PL/ SQL Version 8.0 (PL/ SQL8 ) is the version of PL/ SQL ... a PL/ SQL programmer, and how PL/ SQL programming differs from the kind of programming with which you may be familiar 1.1 What Is PL/ SQL? PL/ SQL stands for "Procedural Language extensions to SQL. "...
  • 50
  • 406
  • 0
Oracle PL/SQL Language Pocket Reference- P11

Oracle PL/SQL Language Pocket Reference- P11

Cơ sở dữ liệu

... written in SQL* Forms, SQL* Reportwriter, SQL* Plus, and SQL* Menu While their PL/ SQL skills have progressed to meet the needs of specific applications, most could expand both their PL/ SQL knowledge ... how to apply all the constructs of the PL/ SQL language You will also be able to examine the complex requirements in your own applications and use the different parts of PL/ SQL to implement those ... edition of Oracle PL/ SQL Programming is divided into seven parts: Part 1, Programming in PL/ SQL Chapters through explain what it means to program in PL/ SQL and in Oracle-based applications in general...
  • 50
  • 320
  • 0
Oracle PL/SQL Language Pocket Reference- P12

Oracle PL/SQL Language Pocket Reference- P12

Cơ sở dữ liệu

... Characteristics of PL/ SQL Tables PL/ SQL Tables and DML Statements Declaring a PL/ SQL Table Referencing and Modifying PL/ SQL Table Rows Filling the Rows of a PL/ SQL Table Clearing the PL/ SQL Table PL/ SQL Table ... Table 10.3 PL/ SQL Tables and DML Statements Tables are PL/ SQL constructs PL/ SQL is a linguistic extension of the Oracle SQL language, but it is distinct from SQL When PL/ SQL executes a SQL DML statement ... features like PL/ SQL tables Note that PL/ SQL Release 2.3 offers several substantial enhancements to the PL/ SQL tables, covered in Section 10.8, "PL/ SQL Table Enhancements in PL/ SQL Release 2.3"...
  • 50
  • 391
  • 0
Oracle PL/SQL Language Pocket Reference- P13

Oracle PL/SQL Language Pocket Reference- P13

Cơ sở dữ liệu

... Declaring a PL/ SQL Table 10.4 Declaring a PL/ SQL Table Oracle PL/ SQL Next: 10.6 Filling the Rows Programming, 2nd Edition of a PL/ SQL Table 10.6 Filling the Rows of a PL/ Book Index SQL Table The ... Modifying PL/ SQL Table Rows 10.5 Referencing and Modifying PL/ SQL Table Rows Oracle PL/ SQL Programming, 2nd Edition Book Index Next: 10.7 Clearing the PL/ SQL Table 10.7 Clearing the PL/ SQL Table ... of a PL/ SQL Table Oracle PL/ SQL Programming, 2nd Edition Book Index Next: 10.8 PL/ SQL Table Enhancements in PL/ SQL Release 2.3 10.8 PL/ SQL Table Enhancements in PL/ SQL Release 2.3 The Oracle...
  • 50
  • 304
  • 0
Oracle PL/SQL Language Pocket Reference- P14

Oracle PL/SQL Language Pocket Reference- P14

Cơ sở dữ liệu

... REPLACE function is: FUNCTION REPLACE (string1 IN VARCHAR2, match_string IN VARCHAR2 [, replace_string IN VARCHAR2]) RETURN VARCHAR2 If you not specify the replacement string, then REPLACE simply ... match string nor a replacement string, REPLACE returns NULL Here are several examples using REPLACE: q Remove all instances of the letter "C" in the string "CAT CALL": REPLACE ('CAT CALL', 'C') ... I did not specify a replacement string, REPLACE changed all occurrences of "C" to NULL Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark q Replace all occurrences of...
  • 50
  • 334
  • 0
Tài liệu Oracle PL/SQL Language Pocket Reference- P15 pptx

Tài liệu Oracle PL/SQL Language Pocket Reference- P15 pptx

Cơ sở dữ liệu

... commission FROM employee WHERE employee_id = :emp.employee_id; Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark BEGIN END; 13.3.5 The SQLCODE function The SQLCODE function ... are two kinds of conversion: implicit and explicit An implicit conversion is performed by PL/ SQL as needed to execute a statement An explicit conversion takes place when you use a built-in conversion ... either the SQL or PL/ SQL languages to perform implicit conversions on your behalf Whenever possible, use a conversion function to guarantee that the right kind of conversion takes place Implicit...
  • 50
  • 462
  • 0
Tài liệu Oracle PL/SQL Language Pocket Reference- P16 ppt

Tài liệu Oracle PL/SQL Language Pocket Reference- P16 ppt

Cơ sở dữ liệu

... the PL/ SQL language and explains how to build complete PL/ SQL applications using program modules q q q Chapter 15, Procedures and Functions, presents the basics of modular programming in PL/ SQL ... utilized features of PL/ SQL Chapter 17, Calling PL/ SQL Functions in SQL, describes how you can construct PL/ SQL functions and call them from SQL Previous: 14.3 Conversion Function Examples 14.3 Conversion ... Review of PL/ SQL Block Structure Chapter 1, Introduction to PL/ SQL, provided a brief introduction to the PL/ SQL block and its structure Before we explore the construction of modules in PL/ SQL, let's...
  • 50
  • 466
  • 0
Tài liệu Oracle PL/SQL Language Pocket Reference- P17 docx

Tài liệu Oracle PL/SQL Language Pocket Reference- P17 docx

Cơ sở dữ liệu

... Chapter 2, PL/ SQL Language Fundamentals, for a complete list of rules) Let's look at a couple of examples of applying block labels In the first example, I place a label in front of my block simply to ... (VARRAY) (PL/ SQL8 ) Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark q q q PL/ SQL record Object type (PL/ SQL8 ) Large objects (LOBs) such as BFILEs and CLOBs (PL/ SQL8 ) The ... course, I could simply give these variables different names, the much-preferred approach Previous: 15.2 Review of PL/ SQL Block Structure 15.2 Review of PL/ SQL Block Structure Oracle PL/ SQL Programming,...
  • 50
  • 491
  • 0
Tài liệu Oracle PL/SQL Language Pocket Reference- P18 pptx

Tài liệu Oracle PL/SQL Language Pocket Reference- P18 pptx

Cơ sở dữ liệu

... Packaged Functions in SQL Column/Function Name Precedence Realities: Calling PL/ SQL Functions in SQL Examples of Embedded PL/ SQL PL/ SQL is a procedural language extension to SQL, so you can also ... Data Oracle PL/ SQL Programming, 2nd Edition Book Index Next: 17 Calling PL/ SQL Functions in SQL 17 Calling PL/ SQL Functions in SQL The Oracle Library Navigation Please purchase PDF Split-Merge ... where PL/ SQL functions in SQL will you the most good Simplify your SQL statements All the reasons you have to modularize your PL/ SQL code apply to SQL as well, particularly the need to hide complicated...
  • 50
  • 403
  • 0

Xem thêm