我还有与主题相关的其他问题 “不带Order By子句的SQL Select语句的顺序”
让我们假设我们需要证明必须使用Order By来按特定顺序返回行。因此,我们想表明SELECT基于T-SQL返回的行是RANDOM顺序,或者INSERT以随机的顺序插入行
$str = 'I am [pitch = "high"]Rudratosh Shastri[endpitch]. what is your name ? how are you? sorry [pause ="3000"] i can not hear you ?[rate="-70.00%"] i still can\'t hear you[endrate] ? [rate="+50.00%"]why i can\'t hear you[endrate] ?';
echo preg_replace('~\[pause[^]]*"(\d+)"]~', '<break time="$1ms"/>', $str);
// => I am [pitch = "high"]Rudratosh Shastri[endpitch]. what is your name ? how are you? sorry <break time="3000ms"/> i can not hear you ?[rate="-70.00%"] i still can't hear you[endrate] ? [rate="+50.00%"]why i can't hear you[endrate] ?
我应该在此SQL中进行哪些更改,以使行以WRONG顺序返回,而不是按照将其插入数据库的顺序返回。
其他问题:
当我执行SELECT时,似乎总是以非常特定的顺序返回数据
DECLARE @NotSortedTable TABLE(
ID INT NOT NULL,
C1 INT,
C2 FLOAT,
C3 DATETIME,
C4 VARCHAR(5)
)
INSERT INTO @NotSortedTable
VALUES (3, 3, 3.0, '26 oct 2018', 'Z'),
(2, 2, 2.0, '25 oct 2018', 'Y'),
(1, 1, 1.0, '24 oct 2018', 'X')
SELECT * FROM @NotSortedTable
此顺序在数据库中的确切位置在哪里?这是HDD的某些属性,索引还是秒数?还是其他?
感谢帮助