SQL SERVER – Displaying Smiley in SSMS – Emoji

Recently I had an interesting conversation with my client about Emoji in SQL Server. The question from my client was about is there any way he can name his database which contains smiley. Absolutely it is possible to create your database with any emoji or even display the emoji in your SSMS (SQL Server Management Studio)’s result tab.

SQL SERVER - Displaying Smiley in SSMS - Emoji emoji-800x372

The simplest possible way is to just type in emoji in the SSMS query window and run the query. It will display the image in the result tab. For example, if you run the following query you will get respective emoji in the results.

SELECT N'????☹?????'

When you run the above code you will see the result as follows:

SQL SERVER - Displaying Smiley in SSMS - Emoji emoji1

You can pretty much select any emoji from the site Unicode Emoji and display them in any of the object names in the SQL Server.

Similarly, you can also create the database with similar funny names.

CREATE DATABASE [????☹?????]

When you look at your SSMS, you will see the results which are similar to the following:

SQL SERVER - Displaying Smiley in SSMS - Emoji emoji2

Yes, it is absolutely, possible to display emojis in SQL Server Management Studio.

Comprehensive Database Performance Health Check is my MOST popular service. Customers opt for this service when they face performance issues with SQL Server. Based on the complexity of your system, it can take anywhere from 2–4 hours to complete the entire exercise.

Here are six-part blog post series I have written based on my last 10 years of experience helping with the Comprehensive Database Performance Health Check. I strongly recommend you to read them as they walk you through my business model.

Reference: Pinal Dave (https://blog.sqlauthority.com)

emoji, SQL Scripts, SQL Server, SQL Server Management Studio, SSMS
Previous Post
SQL SERVER – Drivers for DevOps – Efficient Monitoring
Next Post
SQL SERVER – Import Data from Excel

Related Posts

6 Comments. Leave new

  • Albert van Biljon
    February 28, 2020 2:56 pm

    Interesting – I can’t really imagine why one would want to use emojis in object names! (I have seen WiFi names with emojis though.)
    In SQL Server Management Studio 17.9.1, this doesn’t work all the way though: When selecting results to grid, the emojis are mostly displayed as blocks but in results to text it shows correctly. Also, the database name shows only as blocks.

  • Dear lord i hope I never come across a database like this, I have no desire to write those queries.

  • While I would not recommend naming databases using emojis. An interesting point to add, is that you cannot make two databases with emojis as their name (e.g. you cannot have [?] and [?]). This is because in the underlying code it strips the emojis out. So effectively the first database becomes [] and therefore you cannot have another one with the same name of [].

    This is of course assuming they haven’t fixed this “bug” in newer versions.

  • it would nice if the appropriate emoji could be displayed on the status bar while a query is running. ex: system overload, cpu, disk, network

  • Nitin Vartak
    May 19, 2020 8:32 am

    Can I find and extract emoji from the nvarchar variable in SQL. Is there SQL function available for this?

  • Oh dear God, What have they done!?!?!?


Leave a Reply