Hi all,
I found something strange with calculate field query in MySQL 5.
My base table structure like this :
CREATE TABLE `BrgIn2` (
`PO` varchar(17) NOT NULL default '',
`BrgId` int(10) NOT NULL default '0',
`Qty`
Hi all,
I have table with primary key on field PO,BrgId, NOSP but when i try
insert several new reccord with field NOSP = '', mysql will accept the
new reccord without complaint error.
Is this normal behavior? My perception if i have primary key on the
three field the three field must be not
, but not the same table
definiton
:
constraints+indexes+stats !
try :
create index toto on Barang(BrgId, Kode, Barang);
Select BrgId, Kode, Barang From Barang
Group By Barang
Having Count(*) 1 ;
Mathias
Selon Hendro Suryawan [EMAIL PROTECTED]:
Hi,
I have 8414 records in table
[EMAIL PROTECTED] wrote:
My suggestion: Don't use a subquery, use a temp table (
http://dev.mysql.com/doc/mysql/en/rewriting-subqueries.html)
CREATE TEMPORARY TABLE tmpDupes (KEY (`Barang`))
SELECT `Barang`
FROM Barang
GROUP BY Barang
HAVING count(1) 1;
Select b.`BrgId`, b.`Kode`, b.`Barang`
Hi,
I have 8414 records in table name Barang, I run query like this :
Select BrgId, Kode, Barang From Barang Where Barang in
(Select Barang From Barang Group By Barang Having Count(*) 1 )
and the answer took 54813 ms. I think is too long. I ran the same query
against same table in MS SQL