This month's discount Comprehensive Database Performance Health Check · Testimonials
SQLAuthority with Pinal Dave
Home
  • Consulting
    • Health Check
  • Free Videos
  • All Articles
    • AI
    • SQL Performance
    • SQL Tips and Tricks
    • Interview Questions and Answers
    • SQL Puzzle
    • SQL Video
    • SQLAuthority News
    • Personal
  • Books
  • Consulting
Gouache painting of a wall of small wooden card drawers with one vermilion drawer pulled open and a fresh card among older ones.

MongoDB updateOne: $set, $inc and Upserts Without Surprises

May 21, 2020
Pinal Dave
SQL Tips and Tricks
Database, MongoDB, NoSQL, SQL Scripts

MongoDB updateOne changes one document, and its result object shows how many documents matched and how many changed. This post tests $set, $inc, updateMany, upserts and the replaceOne mistake that wipes every other field.

Read More
Gouache painting of a farm produce stand with crates of vegetables, a brass magnifying glass on one crate and a vermilion basket of chosen tomatoes.

MongoDB find: Filters, Projections and Sorting for SQL People

May 20, 2020
Pinal Dave
SQL Tips and Tricks
Database, MongoDB, NoSQL, SQL Scripts

MongoDB find returns the documents that match a filter. This post tests find, findOne, $gt, $in, $and, $or, projection, sort, limit and countDocuments on 18 grocery products, each next to its SQL equivalent.

Read More
Gouache painting of a brass mail slot beside a tied bundle of envelopes, with one vermilion envelope sticking out at an angle.

MongoDB insertOne and insertMany: Adding Documents the Right Way

May 19, 2020
Pinal Dave
SQL Tips and Tricks
Database, MongoDB, NoSQL, SQL Scripts

MongoDB insertOne adds a document and insertMany adds a list. This post tests both with a unique index, a generated _id and a duplicate key in the middle of a batch, comparing ordered: true with ordered: false and showing what landed.

Read More
Gouache painting of open cardboard folders on a desk holding cards of different shapes, a brass key beside them and one vermilion folder.

Getting Started With mongosh: Databases, Collections and Documents

May 18, 2020
Pinal Dave
SQL Tips and Tricks
Database, MongoDB, NoSQL, SQL Scripts

mongosh is the shell that connects you to MongoDB. This post connects, creates a database and a collection on the first write, and stores a document. It explains the _id, the BSON types and the habits that surprise SQL Server people.

Read More
Gouache painting of a row of five wooden doors in a stone wall, four grey and slate and one vermilion

HAS_DBACCESS Function: List the Databases You Can Open

May 16, 2020
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Server Security

The HAS_DBACCESS function tells you whether the current login can open a database. One query over sys.databases turns it into a list, and this post tests six databases to show what each zero means: no user, offline, restricted or a busy single user slot.

Read More
A glass water jug refilled from three tumblers, stopping just below its red rim line.

Why FLOAT Math Does Not Add Up in T-SQL Queries

May 13, 2020
Pinal Dave
SQL Tips and Tricks
Mathematical Function, SQL Datatype, SQL Server

See why FLOAT math produces approximate sums and comparisons in SQL Server, then use DECIMAL or tolerance checks for the right data.

Read More
Gouache painting of a gravel track branching into footpaths leading to three sheds, the nearest with a vermilion door

Windows Path Variable: Run oStress From Any Folder

May 9, 2020
Pinal Dave
SQL Tips and Tricks
Command Line, SQL Utility, sqlcmd, Windows

The Windows Path variable is a list of folders that Windows searches when you type a program name. This post shows how to test a change in one window, add a folder for good and check that it works. It uses oStress and sqlcmd as the examples and ends with rules for a clean Path.

Read More
Previous 1 … 51 52 53 54 55 56 57 … 570 Next
  • Books
  • Testimonials
  • Privacy Policy

© 2006 – 2026 All rights reserved. pinal @ SQLAuthority.com