As the important news can appear and between releases of news letters, I shall use this page for the publication of the information on all changes on the site.
The forum is not so suitable for this purpose since the message there "escapes" and can appear on previous page before it will lose a urgency.
So look in here if you wish to be well informed about last events on the site. The link to this page is in section of news at the main page below a subscription banner.
§
§
Exercises under SQL Server is now checking on 2019 version.
§
The nearest birthdays. Do not forget to congratulate!
Olga Novgorodova (Nechaeva Olga) - 10, February Alexey Isip (Исип А.А.) - 11, February Vyacheslav Denisov (ambal) - 11, February Mikhail Pcheliakov (МихаилП) - 11, February Nikita Vinogradov (SQL_DBA) - 13, February Eduard Karpeshin (Zealdequar) - 14, February Nikolay Popov (Nicolay Popov) - 14, February Pavel Zotov (Ozzy) - 14, February Rashit Safiev (Rash ST) - 15, February Yuriy Bekish (FedorStalker) - 15, February
§
Last certified:
Alexander Hohlov (rald6839) - 7, February Anastasiya Golubeva (Сutie) - 5, January Maksim Chuvstvin (chuvstvinmaxim) - 24, December Eugene Kocherov (ssense) - 22, December Igor Nazarenko (ki.mono) - 20, December Denis Protasov (preblud) - 19, December Anastasiia Mordvintseva (ashigray) - 17, December VLADIMIR BOYARSKIY (ChronoMorzh) - 16, December Nikolay Kulemzin (Bulochka_c_izumom) - 2, December Elena Sayfullina (elena-fairy) - 29, October
The SQL Server POWER (x, y) function raises x to the power of y.
x is an expression of type FLOAT or of a type that can be implicitly converted to FLOAT.
y is an expression of a numeric type.
The returned result has the same type as x.
The returned result is of FLOAT type.
SQRT is the inverse function of POWER(x, 2), so that SQRT(POWER(x,2)) should return x.
Let’s check this
select 3 x, power(3,2) y, sqrt(power(3,2)) sqrt_y;
x y sqrt_y
3 9 3
This is correct. However,
select 3.1 x, power(3.1,2) y, sqrt(power(3.1,2)) sqrt_y;
yields
x y sqrt_y
3.1 9.6 3,09838667696593
This unexpected result in most likelihood has to do with a loss of precision when the POWER function result type (which matches the type of the argument, NUMERIC) is implicitly converted to FLOAT.
§
The resource is positioned as a "handbook" for this site SQL-EX.COM, but can be used irrespective of it also.
§
The following DBMS are used on the site for solving exercises: SQL Server 2017 Express, Oracle Database 11g Express Edition, MariaDB-10.2.13 (compatible with MySQL 8), PostgreSQL 10.3.