1
:
2.
3.
ER
ER
ER
41
Char
10
Primary key
Char
10
Not null
Char
10
42
Char
10
Primary key
Char
10
Not null
Char
10
Foreign key
Char
10
Foreign key
43
Char
10
Primary key
Char
10
Not null
Char
2
Smallint
Char
10
Foreign key
Char
10
Foreign key
44
Char
10
Primary key
Char
10
Not null
Smallint
Char
10
Foreign key
45
char
10
Primary key,Foreign key
char
10
Primary key,Foreign key
Int
46
Char
10
Primary key
Char
10
Not null
Char
10
Char
10
Smallint
Char
10
Foreign key
SQL
Create database
On primary
namedata,filenamed:data.mdf,
Size3mb,filegrowth2mb
Log on
namelog,filenamed:log.ldf,
Size3mb,filegrowth2mb
Create table
char10 primary key ,
char10 not null,
char10
Create table
char10 primary key,
char10 not null,
char10 ,
char10
Foreign key references
Create table
char10 primary key,
char10 not null,
char10 not null,
char10 not null,
smallint not null,
char10 not null,
Foreign keyreferences ,
Checkor
Create table
char10 primary key,
char10 not null,
char2,
smallint ,
char10,
char10 ,
Foreign keyreferences ,
Foreign keyreferences ,
Checkor
Create table
char10 primary key,
char10 not null,
smallint ,
char10,
Foreign keyreferences
On delete cascade
Create table
char10 ,
char10,
int not null,
Primary key,,
Foreign keyreferences ,
Foreign keyreferences
Insert into ValuesX101,,
Insert into valuesX102,,
Insert into valuesX103,,
Insert into valuesX104,,
Insert into valuesX105,,
Insert into valuesX106,,
Insert into valuesX107,,
Insert into valuesX108,,
Insert into valuesX109,,
Insert into valuesX110,,
Insert into values101,101,x101,A
Insert into values102,102,x102,B
Insert into values103,103,x103,C
Insert into values104,104,x104,D
Insert into values105,105,x105,E
Insert into values106,106,x106,F
Insert into values107,107,x107,G
Insert into values108,108,x108,H
Insert into values109,109,x109,I
Insert into values110,110,x110,J
Insert into valuesT01,Wang,,,56,x101
Insert into valuesT02,Li,,,34,x102
Insert into valuesT03,Zhang,,,45,x103
Insert into valuesT04,Liu,,,69,x104
Insert into valuesT05,zhu,,,49,x105
Insert into valuesT06,Liu,,,33,x106
Insert into valuesT07,Liu,,,35,x107
Insert into valuesT08,Liu,,,50,x108
Insert into valuesT09,Liu,,,47,x109
Insert into valuesT10,Liu,,,40,x110
Insert into values00001,,,19,X101,101
Insert into values00002,,,20,X102,102
Insert into values00003,,,18,X103,103
Insert into values00004,,,19,X104,104
Insert into values00005,,,19,X105,105
Insert into values00006,,,18,X106,106
Insert into values00007,,,19,X107,107
Insert into values00008,,,20,X108,108
Insert into values00009,,,19,X109,109
Insert into values00010,,,19,X110,110
Insert into valuesA,,3,T01
Insert into valuesB,,4,T02
Insert into valuesC,,6,T03
Insert into valuesE,,4,T04
Insert into valuesF,,4,T05
Insert into valuesG,,3,T06
Insert into valuesH,,1,T07
Insert into valuesI,,3,T08
Insert into valuesJ,,4,T09
Insert into valuesK,,5.5,T10
Insert into values00001,A,95
Insert into values00001,B,90
Insert into values00002,C,78
Insert into values00002,D,76
Insert into values00002,A,82
Insert into values00003,E,91
Insert into values00004,F,89
Insert into values00005,C,86
Insert into values00005,I,88
Insert into values00006,A,96
Insert into values00006,K,93
Insert into values00007,B,78
Insert into values00007,J,68
Insert into values00007,F,73
Insert into values00008,C,98
Insert into values00009,A,92
Insert into values00010,C,68
Insert into values00010,A,70
Create index index1 on
Create index index2 on
Create index index3 on
Create index index4 on
Create index index5 on
Create index index6 on
create view
as
select ,,
from
create view
as
select ,,,
from
create view
as
select ,,,,,
from
create view
as
select ,,,
from
create view
as
select ,,
from
create view
as
select ,,,,,
from
Create procedure
char10, char10, char10, char10, smallint, char10
As
Insert into
Values,,,,,
Create procedure char10, char10, char10, char10, smallint, char10
As
Update
Set ,,, ,
Where
Create procedure char10, char10, smallint, char10
As
Insert into
Values,,,
Create procedure char10, char10, smallint, char10
As
Update
Set ,,
Where
Create procedure char10, char10, char10, smallint, char10, char10
As
Insert into
Values,,, ,,
Create procedure char10, char10, char10, smallint, char10, char10
As
Update
Set ,,,,
Where
Create procedure char10, char10, int
As
Insert into
Values,,
Create procedure char10, char10, int
As
Update
Set
Where and
Select from where 00003
Select from where T01
Select from where 00001
Select a.,,,,
From a inner join b on a.b. inner join c on b.c.
Where 102
Select
From a inner join b on a.b. inner join c on b.c.
Where a.00001
Select AVG,MAX
From a inner join b on a.b. inner join c on b.c.
Where b.A
Group by
Having 101
EMBED MERGEFORMAT
EMBED MERGEFORMAT
EMBED MERGEFORMAT
EMBED MERGEFORMAT
EMBED MERGEFORMAT
EMBED MERGEFORMAT