python ruby-programming-language Smalltalk Vue.js Knockoutjs TypeScript JavaScript, OOPs JavaScript Angular 8,7,6,5,4 and 2 Interview Questions and Answers Angular 8,7,6,5,4 and 2 Interview Questions and Answers Angular 4 Angular 2 AngularJs 1.x NodeJs Perl Programming R Programming RequireJs Rust Programming Backbonejs closure programming language go-programming-language kotlin-programming-language
Best SQL Query for Happy New Year [SQL Query]

Best SQL Query for Happy New Year [SQL Query]

In this article, I will explain some general SQL Server “Queries”. I think most of each developer wants to write a query to PRINT “Happy New Year” and sent to developers and team for their BEST WISHES.

Due to this, I am tried to write a “SQL Query” and sharing with you! If you have any other smart query related to this (You can share to me and I will re-publish this post with your query!)

The Query Example As,

-- Simple Query
SELECT CAST(0X4861707079204E65772079656172 AS VARCHAR(100)) AS 'Result'

-- OR

-- Some Stylish Query
SELECT  SPACE(TOTAL - LEN(REPLICATE(CHAR(CHARACTERS), NO))) +
REPLICATE(CHAR(CHARACTERS), NO * 2-1) as 'HappyNewYear'
 FROM 
  (
    SELECT TOP 5 ROW_NUMBER() OVER (ORDER BY name) 
   AS NO, 15 AS total, 214 
    AS CHARACTERS FROM sysobjects 
  ) AS T
UNION ALL
SELECT SPACE(10) + CAST(0X4861707079204E65772079656172 AS VARCHAR(100))


Results :-

Happy New year


              Ö
             ÖÖÖ
            ÖÖÖÖÖ
           ÖÖÖÖÖÖÖ
          ÖÖÖÖÖÖÖÖÖ
          Happy New year
ANIL SINGH

Hi there! Welcome to my blog. My name is Anil Singh. I'm a author of this blog. For more detail about me, kindly refer to this link..
My Blogs - http://code-sample.com and http://code-sample.xyz
My Books - Interview Questions and Answers Books- Get Your Book in 15+ Digital Stores Worldwide..

You Might Also Like
www.code-sample.com/. Powered by Blogger.
ASK Questions