Database Reference
In-Depth Information
&5($7( 7$%/(
$57,67
$UWLVW,'
,QW
127 18//
,'(17,7<
/DVW1DPH
&KDU
127 18//
)LUVW1DPH
&KDU
127 18//
1DWLRQDOLW\
&KDU
18//
'DWH2I%LUWK
1XPHULF
18//
'DWH'HFHDVHG
1XPHULF
18//
&21675$,17
$UWLVW3.
35,0$5< .(<
$UWLVW,'
&21675$,17
$UWLVW$.
81,48(
/DVW1DPH
)LUVW1DPH
&21675$,17
1DWLRQDOLW\9DOXHV
&+(&.
1DWLRQDOLW\
,1
&DQDGLDQ
(QJOLVK
)UHQFK
*HUPDQ
0H[LFDQ
5XVVLDQ
6SDQLVK
8QLWHG6WDWHV
&21675$,17
%LUWK9DOXHV&KHFN
&+(&.
'DWH2I%LUWK
'DWH'HFHDVHG
&21675$,17
9DOLG%LUWK<HDU
&+(&.
'DWH2I%LUWK
/,.(
>@>@>@>@
&21675$,17
9DOLG'HDWK<HDU
&+(&.
'DWH'HFHDVHG
/,.(
>@>@>@>@
&5($7( 7$%/(
:25.
:RUN,'
,QW
127 18//
,'(17,7<
7LWOH
&KDU
127 18//
&RS\
&KDU
127 18//
0HGLXP
&KDU
18//
>'HVFULSWLRQ@
9DUFKDU
18//
'()$8/7
8QNQRZQSURYHQDQFH
$UWLVW,'
,QW
127 18//
&21675$,17
:RUN3.
35,0$5< .(<
:RUN,'
&21675$,17
:RUN$.
81,48(
7LWOH
&RS\
&21675$,17
$UWLVW).
)25(,*1 .(<
$UWLVW,'
5()(5(1&(6
$57,67
$UWLVW,'
2183'$7( 12 $&7,21
21 '(/(7( 12 $&7,21
&5($7( 7$%/(
&86720(5
&XVWRPHU,'
,QW
127 18//
,'(17,7<
/DVW1DPH
&KDU
127 18//
)LUVW1DPH
&KDU
127 18//
6WUHHW
&KDU
18//
&LW\
&KDU
18//
>6WDWH@
&KDU
18//
=LS3RVWDO&RGH
&KDU
18//
&RXQWU\
&KDU
18//
Figure 7-14
SQL Statements
to Create the View
ridge Gallery
Database table
Structure
$UHD&RGH
&KDU
18//
3KRQH1XPEHU
&KDU
18//
(PDLO
9DUFKDU
18//
&21675$,17
&XVWRPHU3.
35,0$5< .(<
&XVWRPHU,'
&21675$,17
(PDLO$.
81,48(
(PDLO
the table name TRANS instead of TRANSACTION so we do not use the
transaction
reserved
word. The table name WORK is also a potential problem; the word
work
is a reserved word in
most DBMS products, as are the column names
Description
in the WORK table and
State
in
the TRANS table. Enclosing such terms in brackets signifies to the SQL parser that these terms
have been provided by the developer and are not to be used in the standard way. Ironically,
SQL Server can process the word WORK without problem, but Oracle Database cannot,
whereas SQL Server chokes on the word TRANSACTION, but Oracle Database has no prob-
lem with it. Because Figure 7-14 shows SQL Server 2012 T-SQL statements, we use WORK (no
brackets), [Description], and [State].
Search WWH ::
Custom Search