News

Read this SQL ... query to limit or refine results. The alternative is often multiple queries or unwanted manipulation of the raw data. With a subquery, you can reference tables to determine ...
This script works…when the table has rows. But this table is occasionally cleared out. Due to the nature of this program, Table1 sometime has no entries at all. When that happens, I need to ...
Simply join two SELECT statements with the UNION keyword to combine the results of two queries into a new table. When working with databases other than Microsoft's SQL Server, check the manual to ...
One of the most common problems when running SQL Servers is slow ... non-clustered index to the table being scanned. By looking at the predicates of the query, you can see the columns upon which ...
such as "INSERT INTO your_table (column1,column2) VALUES ('1','a') ON DUPLICATE KEY UPDATE column1='1', column2='a';" Run your modified query in your SQL browser to view the results. If a ...
SQL Server 2016 lets you treat JSON objects like rows in a table, allowing you to use data from AJAX queries in joins, updates and any other SQL statement you can think of. SQL Server 2016 provides ...
For the past several weeks I’ve been doing nothing but complaining about vendors so I thought I’d take a break and write something about SQL ... table and write a simple query because all ...
I can correlate the values by directly comparing query results from both tables. In the SQL code, I used fully qualified column names because I’m directly comparing the two tables, not merely ...
It’s common practice to return the results of a scalar function as a column in a SELECT query. SQL Server Enterprise offers “partitioning,” which allows you to split database tables into ...
those methods can become just thin wrappers around SQL queries. If you want to play with SQL Server’s JSON support (or the other big new feature in SQL Server 2016, temporal tables), you can download ...