The Voice of the DBA

Blogs

T-SQL Tuesday #202 SQL Server Outage You’ll Never Forget: A Roundup

By

When I put together the invitation for T-SQL Tuesday #202, I wasn't sure what...

A Last Minute Trip to the EU

By

My life has some crazy travel stretches for sure. Between speaking, office visits, customer...

Part 3 of 3: Tuning DiskANN — R, Alpha, L, Beam Width, Recall and Latency

By

In Part 1, we saw how ‘Vamana’ represents vectors as nodes, connects them with...

Read the latest Blogs

Forums

BCA KCP Pasar Kebayoran Lama Telp:0821-8200-174

By layanan_Bca88

Telp/Wa 62 8218200174 Jl. Raya Kby. Lama No.174, RT.8/RW.3, Cipulir, Kec. Kebayoran Lama, Kota...

ALAMAT BCA KCU SCBD Telp/Wa:0821-8200-233

By m4rt1n4

Tlp Cs Bca 08218200233 Equity Tower, Ground Floor, Unit D & Lantai 8, Unit...

Alamat BCA KCP Mayestik Telp/Wa:0821-8200-2031

By R4nt4u

Phone Cs 08218200203 Jl. Kyai Maja No.77, RT.12/RW.3, Gunung, Kec. Kby. Baru, Kota Jakarta...

Visit the forum

Question of the Day

ORDER BY alias

There is a table tmp_tab:

CREATE TABLE tmp_tab (
id int,
val int
);
INSERT INTO tmp_tab VALUES
(1, 1),
(2, NULL),
(3, 3),
(4, 4),
(5, 5);
You want to order the rows ids by the following expression:
    ISNULL(val, id) + 1
Which of the following queries produces the expected ordering and why? (Select all correct)

See possible answers