... allow the Oracle user to use SQL
in new and exciting ways.
This book contains nine chapters. It begins by
reviewing some of the common SQLfunctions and
techniques to help transition into the ... string has leading and trailing
spaces ')
FROM dual
Which gives:
TRIM('THISSTRINGHASLEADINGANDTRAILINGSPACES
This string has leading and trailing spaces
Both the leading and trailing ... function_illustrator
WHERE lineno = 0
Which gives:
POWER(VALUE,2)
81
Ordinary TrigonometryOrdinary Trigonometry
Functions
SQL s ordinary trigonometry functions include:
SIN — Returns the sine of a value.
COS...
... categorize Oracle s SQLfunctions into simple
SQL functions, numeric functions, statistical functions,
string functions, and date functions. In this chapter, we
selectively illustrate several functions ... string has leading and trailing
spaces ')
FROM dual
Which gives:
TRIM('THISSTRINGHASLEADINGANDTRAILINGSPACES
This string has leading and trailing spaces
Both the leading and trailing ... gives:
POWER(VALUE,2)
81
Ordinary TrigonometryOrdinary Trigonometry
Functions
SQL s ordinary trigonometry functions include:
SIN — Returns the sine of a value.
COS — Returns the cosine of a value.
TAN...
... vbCrLf
strSQL &= "WHERE CustomerID = @Cust_Id and OrderDate =
@Order _Date& quot;
' Store the SQL String
Me.lblSQLString.Text = strSQL
' Use the SQL String to build ... setting the initial values, you are then ready to use the variables within the rest of your
procedure, any way that you need them, again, by using the @varname syntax.
Utilizing Built -In Functions ... to bring up the code.) Creating the T -SQL routine described in the
"Technique" section, this code then assigns the routine to the Text property of the
Label called lblSQLString. It...
... 18
Trang 27
SQL và PL /SQL
Cơ bản
Oracle cơ bản - SQL và PL /SQL
Hình vẽ 3. Câu lệnh của SQL* Plus
Khác biệt giữa lệnh SQL và SQL* Plus
SQL
Là ngôn ngữ để giao tiếp với Oracle Server
trong ...
ENAME
SMITH
Ví dụ hàm INITCAP(char)
SELECT INITCAP(DNAME), INITCAP(LOC) FROM DEPT;
INITCAP(DNAME) INITCAP(LOC)
Oracle cơ bản - SQL và PL /SQL
COLUMN ename HEADING ‘Employee|Name’ FORMAT ... gồm:
Hàm SQL
AVG([DISTINCT/ALL] n)
COUNT([DISTINCT/ALL] expr)
MAX([DISTINCT/ALL] expr)
MIN([DISTINCT/ALL] expr)
STDDVE([DISTINCT/ALL] n)
SUM([DISTINCT/ALL] n)
VARIANCE([DISTINCT/ALL]...
... TRẢ LỜI BÀI TẬP ORACLE
Chương 7
SQL* LOADER
1. Tập tin bad là gì? Chúng được tạo ra như thế nào? Tập tin bad
chứa những gì? Được ghi theo khuôn mẫu nào?
Các tập tin bad dùng để SQL* Loader có ... (version) SQL* Loader và ngày chạy. Phần thông tin toàn cục
chứa tên tất cả các file input và output, các thông số hàng lệnh và
một đặc tả ký tự liên tục nếu có yêu cầu. Phần thông tin bảng liệt ... control gốc.
2. Chức năng và nội dung của tập tin log?
Việc ghi lại sự thực thi của SQL* Loader diễn ra trong log file. Nếu vì
bất kỳ lý do nào SQL* Loader không thể tạo ra một log file, sự thực...
... statements inserts a row into the table? (Choose three.)
A.
INSERT INTO employees
VALUES ( NULL, ‘John’,‘Smith’);
B.
INSERT INTO employees( first_name, last_name)
VALUES(‘John’,‘Smith’);
C.
INSERT ...
CUSTOMER_NAME VARCHAR2(100) NOT NULL
STREET_ADDRESS VARCHAR2(150)
CITY_ADDRESS VARCHAR2(50)
STATE_ADDRESS VARCHAR2(50)
PROVINCE_ADDRESS VARCHAR2(50)
COUNTRY_ADDRESS VARCHAR2(50) POSTAL_CODE
VARCHAR2(12) ... dept_id, MIN(salary), MAX(salary)
FROM employees
HAVING MIN(salary) < 5000 AND MAX(salary) > 15000; D.
SELECT dept_id, MIN(salary), MAX(salary)
FROM employees
GROUP BY dept_id
HAVING MIN(salary)...
...
START _DATE DATE
END _DATE DATEM
Which two aggregate functions are valid on the START _DATE column?
(Choose two.)
A.
SUM(start _date)
B.
AVG(start _date)
C.
COUNT(start _date)
D.
AVG(start _date, ... the average commission earned in
department 20.
C.
Finding the number of employees who do NOT earn commission and are working for
department 20.
D.
Inserting into the table a new employee ... would require subqueries or joins in order to
perform in a single step? (Choose three.)
A.
Deleting the records of employees who do not earn commission.
B.
Increasing the commission of employee...
... Oracle cơ bản - SQL và PL /SQL
Chương 1. GIỚI THIỆU CHUNG
1.1.NGÔN NGỮ SQL
1.1.1. Lịch sử phát triển của ngôn ngữ SQL
Mô hình cơ sở dữ liệu (CSDL) quan ... giữa
những năm 70. Hệ ngôn ngữ SQL đầu tiên (SEQUEL2) được IBM công bố vào tháng 11
năm 1976. Năm 1979, tập đoàn Oracle giới thiệu thương phẩm đầu tiên của SQL. SQL cũng
được cài đặt trong các ... IBM và SQL/ DS.
Ngày nay, SQL được sử dụng rộng rãi và đuợc xem là ngôn ngữ chuẩn để truy cập CSDL
quan hệ.
1.1.2. Chuẩn SQL
Năm 1989, viện tiêu chuẩn quốc gia Hoa Kỳ (ANSI) công nhận SQL là...
... is shown in Example 6-39
.
Example 6-39. File: UsingLockingHintsForPessimisticLockingForm.cs
// Namespaces, variables, and constants
using System;
using System.Configuration;
using System.Data; ... determines correct locking; hints should be used only when necessary.
Locking hints override the current transaction isolation level for the session.
A locking hint is specified following the ... according to their function.
Table 6-21. SQL Server locking hints for isolation level
Locking hint Description
HOLDLOCK
Hold a shared lock until the transaction is completed instead
of releasing...
... preventing other users from reading or
updating the table. By default, the lock is held until the end of the
statement.
Table 6-23. SQL Server Locking Hints for Other Functions
Locking
hint ... according to their function.
Table 6-21. SQL Server locking hints for isolation level
Locking hint Description
HOLDLOCK
Hold a shared lock until the transaction is completed instead
of releasing ... determines correct locking; hints should be used only when necessary.
Locking hints override the current transaction isolation level for the session.
A locking hint is specified following the...