In SQL Server, you can use the sp_rename stored procedure to rename an object, including a column.
how to
5 Ways to Check the Size of a Collection in MongoDB
In this article I present 5 ways that you can use to check the size of a MongoDB collection when using the mongo shell.
How to Fix “Procedure expects parameter ‘@statement’ of type ‘ntext/nchar/nvarchar’.” Error in SQL Server
It’s quite easy to encounter error Msg 214, Level 16 when executing stored procedures such as sp_executesql or sp_describe_first_result_set.
Fortunately it’s easy to fix too!
The most common reason for getting this error is that you forgot to prefix your string with N.
Therefore, to fix this issue, try prefixing your string with N.
3 Ways to Extract the Month from a Date in SQL Server (T-SQL)
Here are three T-SQL functions that you can use to extract the month from a date in SQL Server.
5 Ways to Insert Documents in MongoDB
MongoDB provides many ways to insert documents into a collection.
Here are 5 ways to insert documents into a collection when using the mongo shell.
Join 3 Tables in SQL
In SQL, you can join three tables or more by adding another join after the first one.
You can also run nested joins by specifying one join as the join condition for another.
Get the Underlying Columns of a View Based on its Result Set
One of the great things about database views, is that they allow you to run complex queries without needing to know the underlying database schema.
Yes, it’s true that you need to know the underlying schema when you create the view, but you only need to do that once. Once you’ve created it, you can query that view all day long without needing to remember all the table and column names, etc.
Views typically combine data from multiple tables into a single, virtual table, which makes it kind of like a “black box”. As long as it works as designed, you don’t need to concern yourself with the hidden details.
But what if you do want to check a view for its underlying tables and columns?