54
place_id int (10) unsigned NOT NULL,
55
shows int(10) unsigned DEFAULT '0' NOT NULL,
56
ishows int(10) unsigned DEFAULT '0' NOT NULL,
57
ushows int(10) unsigned DEFAULT '0' NOT NULL,
58
clicks int(10) unsigned DEFAULT '0' NOT NULL,
59
iclicks int(10) unsigned DEFAULT '0' NOT NULL,
60
uclicks int(10) unsigned DEFAULT '0' NOT NULL,
54
place_id int unsigned NOT NULL,
55
shows int unsigned DEFAULT '0' NOT NULL,
56
ishows int unsigned DEFAULT '0' NOT NULL,
57
ushows int unsigned DEFAULT '0' NOT NULL,
58
clicks int unsigned DEFAULT '0' NOT NULL,
59
iclicks int unsigned DEFAULT '0' NOT NULL,
60
uclicks int unsigned DEFAULT '0' NOT NULL,
62
62
PRIMARY KEY (place_id,ts)
72
lfdnr int(10) unsigned NOT NULL default '0',
73
ticket int(10) unsigned NOT NULL default '0',
72
lfdnr int unsigned NOT NULL default '0',
73
ticket int unsigned NOT NULL default '0',
74
74
client varchar(255) NOT NULL default '',
75
75
replyto varchar(255) NOT NULL default '',
76
76
subject varchar(100) NOT NULL default '',
77
timestamp int(10) unsigned NOT NULL default '0',
77
timestamp int unsigned NOT NULL default '0',
78
78
tstamp timestamp NOT NULL,
79
status int(3) NOT NULL default '0',
79
status int NOT NULL default '0',
80
80
type varchar(15) NOT NULL default '',
81
assignment int(10) unsigned NOT NULL default '0',
82
fupcount int(4) unsigned NOT NULL default '0',
83
parent int(10) unsigned NOT NULL default '0',
84
activity int(10) unsigned NOT NULL default '0',
85
priority tinyint(1) unsigned NOT NULL default '1',
81
assignment int unsigned NOT NULL default '0',
82
fupcount int unsigned NOT NULL default '0',
83
parent int unsigned NOT NULL default '0',
84
activity int unsigned NOT NULL default '0',
85
priority tinyint unsigned NOT NULL default '1',
86
86
cc varchar(255) NOT NULL default '',
87
87
bcc varchar(255) NOT NULL default '',
88
88
body text NOT NULL,
96
96
KEY ticket (ticket)
98
98
INSERT INTO t1 VALUES (773,773,'','','',980257344,20010318180652,0,'Open',10,0,0,0,1,'','','','','');
99
alter table t1 change lfdnr lfdnr int(10) unsigned not null auto_increment;
99
alter table t1 change lfdnr lfdnr int unsigned not null auto_increment;
100
100
update t1 set status=1 where type='Open';
101
101
select status from t1;
142
142
update t1 set b=(select distinct 1 from (select * from t2) a);
143
143
drop table t1,t2;
144
144
CREATE TABLE t1 (
145
`id_param` smallint(3) unsigned NOT NULL default '0',
145
`id_param` smallint unsigned NOT NULL default '0',
146
146
`nom_option` char(40) NOT NULL default '',
147
`valid` tinyint(1) NOT NULL default '0',
147
`valid` tinyint NOT NULL default '0',
148
148
KEY `id_param` (`id_param`,`nom_option`)
150
150
INSERT INTO t1 (id_param,nom_option,valid) VALUES (185,'600x1200',1);
173
`colA` int(10) unsigned NOT NULL auto_increment,
174
`colB` int(11) NOT NULL default '0',
177
INSERT INTO t1 VALUES (4433,5424);
179
`colC` int(10) unsigned NOT NULL default '0',
180
`colA` int(10) unsigned NOT NULL default '0',
181
`colD` int(10) unsigned NOT NULL default '0',
182
`colE` int(10) unsigned NOT NULL default '0',
183
`colF` int(10) unsigned NOT NULL default '0',
184
PRIMARY KEY (`colC`,`colA`,`colD`,`colE`)
186
INSERT INTO t2 VALUES (3,4433,10005,495,500);
187
INSERT INTO t2 VALUES (3,4433,10005,496,500);
188
INSERT INTO t2 VALUES (3,4433,10009,494,500);
189
INSERT INTO t2 VALUES (3,4433,10011,494,500);
190
INSERT INTO t2 VALUES (3,4433,10005,497,500);
191
INSERT INTO t2 VALUES (3,4433,10013,489,500);
192
INSERT INTO t2 VALUES (3,4433,10005,494,500);
193
INSERT INTO t2 VALUES (3,4433,10005,493,500);
194
INSERT INTO t2 VALUES (3,4433,10005,492,500);
195
UPDATE IGNORE t2,t1 set t2.colE = t2.colE + 1,colF=0 WHERE t1.colA = t2.colA AND (t1.colB & 4096) > 0 AND (colE + 1) < colF;
197
colC colA colD colE colF
209
172
create table t1 (c1 int, c2 char(6), c3 int);
210
173
create table t2 (c1 int, c2 char(6));
211
174
insert into t1 values (1, "t1c2-1", 10), (2, "t1c2-2", 20);