... programming perspective to
them. This book will 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 ... 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...
... Text SQL String
Label Name lblSQLString
Label Text Results
DataGrid Name dgResults
2. Add the following code in Listing 6.6 to the Load event of the form. (Double-click
on the form to bring ...
3. In the class module for the form, add the code in Listing 6.7 to create the
GenerateData routine. After creating the SQL statement, this routine assigns it to
the Text property of lblSQLString. ... you are then specifying that you want values
ending with those letters. For instance, if you specify %ing, you get skiing, flying,
and so on.
End Sub
Private Sub txtToDate_TextChanged(ByVal...
... 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...
... than one row.
E.
The query fails because the outer query and the inner query are using
different
tables.
Question 5:
Which is an SQL* Plus command?
A.
INSERT
B.
UPDATE
C.
SELECT
D.
...
UNIQUE
Question 10:
In a SELECT statement that includes a WHERE clause, where is the GROUP BY
Oracle SQL Exam No.1 - 2005
Page 4 of 14
OracleSQL Exam No. 1
Question 1:
Examine the description ... table? (Choose three.)
A.
INSERT INTO employees
VALUES ( NULL, ‘John’,‘Smith’);
B.
INSERT INTO employees( first_name, last_name)
VALUES(‘John’,‘Smith’);
C.
INSERT INTO employees
VALUES (‘1000’,‘John’,NULL);
D.
...
...
(Choose two.)
A.
SUM(start _date)
B.
AVG(start _date)
C.
COUNT(start _date)
D.
AVG(start _date, end _date)
E.
MIN(start _date)
F.
MAXIMUM(start _date)
END
Oracle SQL Exam No. 2 -2005
Page ... by the subquery. B.
The main query executes with the last value returned by the subquery. C.
The
main query executes with all the values returned by the subquery.
D.
The main query fails ... of 16
You define a multiple-row subquery in the WHERE clause of an SQLquery with
a comparison operator "=".
What happens when the main query is executed?
A.
The main query executes...
... 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...