SELECT TOP 5
Item_Id
FROM
N_SalesPrice
WHERE
Comp_id = '001' AND
_promotype = 1 AND
(StartingDate <= GETDATE() OR StartingDate IS NULL) AND
(EndingDate >= GETDATE() OR EndingDate IS NULL)
ORDER BY NEWID()
array(1) {
["Item_Id"]=>
string(8) "BGS 7182"
}
array(1) {
["Item_Id"]=>
string(7) "BGS 952"
}
array(1) {
["Item_Id"]=>
string(8) "BGS 7181"
}
array(1) {
["Item_Id"]=>
string(14) "UNITE PL-C700A"
}
array(1) {
["Item_Id"]=>
string(7) "BGS 951"
}
Времето за изпълнение на заявката е 1.734 секунди.