In today’s SQL practice, we’ve analyzed only two examples. Still, these two contain some parts you’ll often meet at assignments – either in your work, either in a testing (job interview, college assignments, online courses, etc.). In the next part, we’ll continue with a few more...
[2] given by me using some practical examples I encountered (exercise 9-10). Repository Structure The repo structure is like below: SQL-exercise └───SQL_exercise_1 └───... └───SQL_exercise_* │ *_schema_figure.png │ *_build_schema.sql │ *_questions_and_solutions.sql └...
we use the comments either to add some description or disable some code blocks of the queries. However, adding brief and understandable explanations to our SQL queries is one best practice because, over time, the purpose of the query and its...
For example: Are you rating it high due to having good examples, excellent screen shots, clear writing, or another reason? Are you rating it low due to poor examples, fuzzy screen shots, or unclear writing? This feedback will help us improve the quality of white papers we release. Send ...
To deal with this, you might be tempted to use the ISNUMERIC function. The problem is that this function returns 1 for many examples we might not consider as actually numeric. Even in our example, ‘943,45’ is considered as numeric and the error persists: ...
In Azure SQL Database, consider theQuery Store hintsfeature for forcing query hints on queries without code changes. For more information and examples, seeQuery Store hints. Avoid renaming databases for queries with forced plans Execution plans reference objects by using three-part names likedatabase...
You can use the-helpoption for information about one or more actions. For the most detailed information, including some examples, use the-help=guideoption. For example: C:\Program Files\sqldeveloper\sqldeveloper\bin>migration -help=guide
Examples of breaking changesnot protectedby compatibility level are: Changed column names in system objects. In SQL Server 2012 (11.x) the columnsingle_pages_kbinsys.dm_os_sys_infowas renamed topages_kb. Regardless of the compatibility level, the querySELECT single_pages_kb FROM sys.dm_os_sy...
Each collation is combined as a series of suffixes to define case-, accent-, width-, or kana-sensitivity. The following examples describe sort order behavior for various combinations of suffixes.Expand table Windows collation suffixSort order description _BIN 1 Binary sort _BIN2 1, 2 Binary-...
The first format for the CASE expression has the following syntax: CASE WHEN <condition> THEN <expression if true> ELSE <expression if false> END The ELSE argument is optional. The example given in the introduction uses this format. Let’s take a look at some examples using theEmployeetable...