-
Notifications
You must be signed in to change notification settings - Fork 0
/
ClusturedIndex.sql
142 lines (124 loc) · 12 KB
/
ClusturedIndex.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
CREATE TABLE PERSON(
id int,
first_name varchar(255),
last_name varchar(255),
email varchar(255)
);
select * from PERSON;
sp_Helpindex PERSON;
insert into Person (id, first_name, last_name, email) values (1, 'Magdalen', 'Forryan', 'mforryan0@fda.gov');
insert into Person (id, first_name, last_name, email) values (2, 'Dyna', 'Cussins', 'dcussins1@cpanel.net');
insert into Person (id, first_name, last_name, email) values (3, 'Maura', 'Mates', 'mmates2@hibu.com');
insert into Person (id, first_name, last_name, email) values (4, 'Magdalena', 'Hallet', 'mhallet3@trellian.com');
insert into Person (id, first_name, last_name, email) values (5, 'Ninette', 'Ivanchikov', 'nivanchikov4@wsj.com');
insert into Person (id, first_name, last_name, email) values (6, 'Ola', 'Robbie', 'orobbie5@printfriendly.com');
insert into Person (id, first_name, last_name, email) values (7, 'Katalin', 'Cluff', 'kcluff6@opensource.org');
insert into Person (id, first_name, last_name, email) values (8, 'Hope', 'Newlands', 'hnewlands7@pinterest.com');
insert into Person (id, first_name, last_name, email) values (9, 'Lizabeth', 'Houlridge', 'lhoulridge8@xinhuanet.com');
insert into Person (id, first_name, last_name, email) values (10, 'Michaella', 'Slaymaker', 'mslaymaker9@time.com');
insert into Person (id, first_name, last_name, email) values (11, 'Viv', 'Wadmore', 'vwadmorea@google.de');
insert into Person (id, first_name, last_name, email) values (12, 'Worth', 'Brason', 'wbrasonb@unesco.org');
insert into Person (id, first_name, last_name, email) values (13, 'Alexa', 'Sutherden', 'asutherdenc@theglobeandmail.com');
insert into Person (id, first_name, last_name, email) values (14, 'Antonius', 'Antognetti', 'aantognettid@usatoday.com');
insert into Person (id, first_name, last_name, email) values (15, 'Ricca', 'Dadswell', 'rdadswelle@networksolutions.com');
insert into Person (id, first_name, last_name, email) values (16, 'Nat', 'Batchelder', 'nbatchelderf@meetup.com');
insert into Person (id, first_name, last_name, email) values (17, 'Leisha', 'McHarry', 'lmcharryg@cafepress.com');
insert into Person (id, first_name, last_name, email) values (18, 'Martha', 'Maker', 'mmakerh@shareasale.com');
insert into Person (id, first_name, last_name, email) values (19, 'Debbi', 'Mainstone', 'dmainstonei@amazon.co.uk');
insert into Person (id, first_name, last_name, email) values (20, 'Olav', 'Cumberledge', 'ocumberledgej@amazon.co.uk');
insert into Person (id, first_name, last_name, email) values (21, 'Agnes', 'Skeggs', 'askeggsk@bravesites.com');
insert into Person (id, first_name, last_name, email) values (22, 'Merle', 'Joyson', 'mjoysonl@tiny.cc');
insert into Person (id, first_name, last_name, email) values (23, 'Tibold', 'Lundie', 'tlundiem@freewebs.com');
insert into Person (id, first_name, last_name, email) values (24, 'Nanette', 'MacConnechie', 'nmacconnechien@bloglines.com');
insert into Person (id, first_name, last_name, email) values (25, 'Bendick', 'Gutch', 'bgutcho@independent.co.uk');
insert into Person (id, first_name, last_name, email) values (26, 'Elfrieda', 'Minihane', 'eminihanep@mlb.com');
insert into Person (id, first_name, last_name, email) values (27, 'Fergus', 'McGuffog', 'fmcguffogq@vk.com');
insert into Person (id, first_name, last_name, email) values (28, 'Berthe', 'Macourek', 'bmacourekr@ustream.tv');
insert into Person (id, first_name, last_name, email) values (29, 'Amalita', 'Hellyar', 'ahellyars@goo.ne.jp');
insert into Person (id, first_name, last_name, email) values (30, 'Bear', 'Khomishin', 'bkhomishint@dyndns.org');
insert into Person (id, first_name, last_name, email) values (31, 'Hyacinthia', 'Billion', 'hbillionu@webs.com');
insert into Person (id, first_name, last_name, email) values (32, 'Ewen', 'Tottem', 'etottemv@wikimedia.org');
insert into Person (id, first_name, last_name, email) values (33, 'Tish', 'Ellson', 'tellsonw@biblegateway.com');
insert into Person (id, first_name, last_name, email) values (34, 'Immanuel', 'Grelak', 'igrelakx@webs.com');
insert into Person (id, first_name, last_name, email) values (35, 'Jolyn', 'Rehorek', 'jrehoreky@comcast.net');
insert into Person (id, first_name, last_name, email) values (36, 'Ravi', 'Mulcahy', 'rmulcahyz@craigslist.org');
insert into Person (id, first_name, last_name, email) values (37, 'Dev', 'Howey', 'dhowey10@tamu.edu');
insert into Person (id, first_name, last_name, email) values (38, 'Merv', 'Sieb', 'msieb11@indiatimes.com');
insert into Person (id, first_name, last_name, email) values (39, 'Hirsch', 'Goulder', 'hgoulder12@usa.gov');
insert into Person (id, first_name, last_name, email) values (40, 'Celestyna', 'Hynd', 'chynd13@tuttocitta.it');
insert into Person (id, first_name, last_name, email) values (41, 'Wang', 'Eard', 'weard14@engadget.com');
insert into Person (id, first_name, last_name, email) values (42, 'Waverley', 'Eaklee', 'weaklee15@house.gov');
insert into Person (id, first_name, last_name, email) values (43, 'Laurie', 'Roskell', 'lroskell16@usgs.gov');
insert into Person (id, first_name, last_name, email) values (44, 'Patience', 'Poile', 'ppoile17@blogger.com');
insert into Person (id, first_name, last_name, email) values (45, 'Christi', 'Brewster', 'cbrewster18@surveymonkey.com');
insert into Person (id, first_name, last_name, email) values (46, 'Tadeas', 'Semorad', 'tsemorad19@surveymonkey.com');
insert into Person (id, first_name, last_name, email) values (47, 'Bethina', 'Sharvell', 'bsharvell1a@tinypic.com');
insert into Person (id, first_name, last_name, email) values (48, 'Paquito', 'Matusson', 'pmatusson1b@hubpages.com');
insert into Person (id, first_name, last_name, email) values (49, 'Corrie', 'Demageard', 'cdemageard1c@hud.gov');
insert into Person (id, first_name, last_name, email) values (50, 'Evangelin', 'Deane', 'edeane1d@nba.com');
insert into Person (id, first_name, last_name, email) values (51, 'Theda', 'Retchford', 'tretchford1e@yahoo.com');
insert into Person (id, first_name, last_name, email) values (52, 'Coretta', 'Prewett', 'cprewett1f@oaic.gov.au');
insert into Person (id, first_name, last_name, email) values (53, 'Derril', 'Carbery', 'dcarbery1g@apple.com');
insert into Person (id, first_name, last_name, email) values (54, 'Engelbert', 'Aronin', 'earonin1h@ameblo.jp');
insert into Person (id, first_name, last_name, email) values (55, 'Mallory', 'Utton', 'mutton1i@qq.com');
insert into Person (id, first_name, last_name, email) values (56, 'Emelina', 'Close', 'eclose1j@flickr.com');
insert into Person (id, first_name, last_name, email) values (57, 'Hussein', 'Kermitt', 'hkermitt1k@elpais.com');
insert into Person (id, first_name, last_name, email) values (58, 'Lidia', 'Cordell', 'lcordell1l@tamu.edu');
insert into Person (id, first_name, last_name, email) values (59, 'Marsiella', 'Bodocs', 'mbodocs1m@rambler.ru');
insert into Person (id, first_name, last_name, email) values (60, 'Yasmin', 'Mitchinson', 'ymitchinson1n@imdb.com');
insert into Person (id, first_name, last_name, email) values (61, 'Simmonds', 'McGivena', 'smcgivena1o@msn.com');
insert into Person (id, first_name, last_name, email) values (62, 'Ali', 'Suttling', 'asuttling1p@bizjournals.com');
insert into Person (id, first_name, last_name, email) values (63, 'Aubert', 'MacCurley', 'amaccurley1q@ameblo.jp');
insert into Person (id, first_name, last_name, email) values (64, 'Priscilla', 'Thickpenny', 'pthickpenny1r@howstuffworks.com');
insert into Person (id, first_name, last_name, email) values (65, 'Domenic', 'Cliburn', 'dcliburn1s@mlb.com');
insert into Person (id, first_name, last_name, email) values (66, 'Hadria', 'Allday', 'hallday1t@51.la');
insert into Person (id, first_name, last_name, email) values (67, 'Doroteya', 'Ilyinykh', 'dilyinykh1u@histats.com');
insert into Person (id, first_name, last_name, email) values (68, 'Alick', 'Mapples', 'amapples1v@npr.org');
insert into Person (id, first_name, last_name, email) values (69, 'Livy', 'Ordidge', 'lordidge1w@opera.com');
insert into Person (id, first_name, last_name, email) values (70, 'Larine', 'Linkleter', 'llinkleter1x@fema.gov');
insert into Person (id, first_name, last_name, email) values (71, 'Gris', 'Pleavin', 'gpleavin1y@ezinearticles.com');
insert into Person (id, first_name, last_name, email) values (72, 'Gustaf', 'Baake', 'gbaake1z@i2i.jp');
insert into Person (id, first_name, last_name, email) values (73, 'Henry', 'Chance', 'hchance20@odnoklassniki.ru');
insert into Person (id, first_name, last_name, email) values (74, 'Waring', 'Tuffield', 'wtuffield21@washington.edu');
insert into Person (id, first_name, last_name, email) values (75, 'Cyrill', 'McClay', 'cmcclay22@wufoo.com');
insert into Person (id, first_name, last_name, email) values (76, 'Nappie', 'Higbin', 'nhigbin23@accuweather.com');
insert into Person (id, first_name, last_name, email) values (77, 'Gunther', 'Hogben', 'ghogben24@networksolutions.com');
insert into Person (id, first_name, last_name, email) values (78, 'Delinda', 'Janny', 'djanny25@army.mil');
insert into Person (id, first_name, last_name, email) values (79, 'Gates', 'Ismirnioglou', 'gismirnioglou26@walmart.com');
insert into Person (id, first_name, last_name, email) values (80, 'Hermia', 'Blomfield', 'hblomfield27@phoca.cz');
insert into Person (id, first_name, last_name, email) values (81, 'Marwin', 'Lau', 'mlau28@wiley.com');
insert into Person (id, first_name, last_name, email) values (82, 'Kayla', 'Bellew', 'kbellew29@nytimes.com');
insert into Person (id, first_name, last_name, email) values (83, 'Garwood', 'Guislin', 'gguislin2a@foxnews.com');
insert into Person (id, first_name, last_name, email) values (84, 'Catherina', 'MacCostye', 'cmaccostye2b@4shared.com');
insert into Person (id, first_name, last_name, email) values (85, 'Floria', 'Baden', 'fbaden2c@washingtonpost.com');
insert into Person (id, first_name, last_name, email) values (86, 'Andria', 'Edwin', 'aedwin2d@flickr.com');
insert into Person (id, first_name, last_name, email) values (87, 'Sophronia', 'Grubey', 'sgrubey2e@foxnews.com');
insert into Person (id, first_name, last_name, email) values (88, 'Nadeen', 'Chazette', 'nchazette2f@msu.edu');
insert into Person (id, first_name, last_name, email) values (89, 'Hugh', 'Ibbott', 'hibbott2g@infoseek.co.jp');
insert into Person (id, first_name, last_name, email) values (90, 'Boonie', 'Schubert', 'bschubert2h@state.gov');
insert into Person (id, first_name, last_name, email) values (91, 'Stevena', 'Grayer', 'sgrayer2i@hud.gov');
insert into Person (id, first_name, last_name, email) values (92, 'Thaxter', 'Legat', 'tlegat2j@baidu.com');
insert into Person (id, first_name, last_name, email) values (93, 'Patric', 'Hoxey', 'phoxey2k@ucla.edu');
insert into Person (id, first_name, last_name, email) values (94, 'Greer', 'Filler', 'gfiller2l@newsvine.com');
insert into Person (id, first_name, last_name, email) values (95, 'Elora', 'Sedman', 'esedman2m@sbwire.com');
insert into Person (id, first_name, last_name, email) values (96, 'Dieter', 'Gymblett', 'dgymblett2n@dropbox.com');
insert into Person (id, first_name, last_name, email) values (97, 'Luther', 'Wilde', 'lwilde2o@intel.com');
insert into Person (id, first_name, last_name, email) values (98, 'Mellisent', 'Katt', 'mkatt2p@vimeo.com');
insert into Person (id, first_name, last_name, email) values (99, 'Sherlock', 'Klewi', 'sklewi2q@ucsd.edu');
insert into Person (id, first_name, last_name, email) values (100, 'Arron', 'McGuinley', 'amcguinley2r@jigsy.com');
select * from Person;
CREATE CLUSTERED INDEX IX_CLUSTERED_PERSON_EMAIL
ON PERSON (email);
select * from Person;
INSERT INTO Person (id, first_name, last_name, email) VALUES (101, 'Alex', 'Souza', 'alex10souza@outlook.com');
select * from Person;
CREATE TABLE Student(
id int primary key,
first_name varchar(255)
);
sp_Helpindex Student;
insert into Student (id, first_name) values (9, 'Yiğit');
insert into Student (id, first_name) values (4, 'Mert');
insert into Student (id, first_name) values (1, 'Mösyö');
insert into Student (id, first_name) values (6, 'Bobiko');
select * from Student;