Below are 4 functions that enable you to return the microseconds part from a time value in MariaDB.
how to
3 Ways to Get the Day Name from a Date in MariaDB
Below are three approaches you can use to get the day name from a date in MariaDB.
Two of these approaches return the full day name, and one returns the short day name.
Fix: “Unknown table ‘locales’ in information_schema” in MariaDB
If you get the Unknown table 'locales' in information_schema error in MariaDB, it’s probably because you haven’t installed the LOCALES plugin yet.
You need to install the LOCALES plugin before you try to query this table.
11 Functions to Get the Day, Month, and Year from a Date in MariaDB
MariaDB includes many functions for working with dates. Some of these extract certain parts from such dates and return them as a string or integer.
Below are 11 functions that you can use to return various date parts in MariaDB.
2 Ways to Get a Document’s Size in MongoDB
If you need to return the size of a document in MongoDB, you can use the following:
- The
$bsonSizeaggregation pipeline operator - The
Object.bsonSize()method
Below are examples of each approach.
8 Ways to Add Microseconds to a Datetime Value in MariaDB
If you need to add one or more microseconds to a datetime value in MariaDB, here are 8 options to consider.
How to do an INSERT Pass-Through Query in SQL Server
In SQL Server, you can use OPENQUERY to execute a pass-through query on a linked server.
OPENQUERY is commonly referenced in the FROM clause of a query as if it were a table, but it can also be referenced as the target table of an INSERT, UPDATE, or DELETE statement.
This article presents an example of using OPENQUERY to do an INSERT pass-through query.
3 Ways to Sort Documents in MongoDB
MongoDB provides a few ways to sort documents in a particular order. Each of these allow us to order the documents in ascending or descending order.
There’s also the option to order the results of a $text search – sorting by the computed textScore metadata in descending order.
Here are 3 ways to sort documents in MongoDB.
Replace a String with another String in SQL Server (T-SQL)
In SQL Server you can use the REPLACE() function to replace all occurrences of a string with another string.
The function accepts three arguments; the string that contains the string to be replaced, the string to be replaced, and the string to replace it.
3 Ways to Convert a Date to a String in MongoDB
MongoDB has a Date BSON type that allows you to store dates as dates.
You can also store dates as strings, if that’s what you need.
Taking it a step further, you can also convert a Date to a string.
This article presents three ways to convert a Date to a string in MongoDB.