How to Sort by keeping one value always at top and others in ascending order in SQL ? | SQL Query

Опубликовано: 03 Ноябрь 2024
на канале: ItJunction4all
2,648
72

How to Sort by keeping one value always at top and others in ascending order in SQL ?
This is very important SQL basic question related to custom Sorting.

-------------------------------------------------------------------------
𝗝𝗼𝗶𝗻 𝗺𝗲 𝗼𝗻 𝗦𝗼𝗰𝗶𝗮𝗹 𝗠𝗲𝗱𝗶𝗮:🔥
-------------------------------------------------------------------------
*Instagram :
  / itjunction4all  
*Twitter:
  / sunilkr5672  
-------------------------------------------------------------------------
Table and Insert SQL Script :
-------------------------------------------------------------------------

Create Table Country(
CountryID int,
CountryName varchar(30));

INSERT INTO Country Values(1,'Singapore');
INSERT INTO Country Values(2,'United Kingdom');
INSERT INTO Country Values(3,'Australia');
INSERT INTO Country Values(4,'India');
INSERT INTO Country Values(5,'Bangladesh');
INSERT INTO Country Values(6,'China');
INSERT INTO Country Values(7,'New Zealand');

#CustomSorting #ORDERBY #SQLInterview #ETLTesting #ITJUNCTION4ALL #SunilKumar
#sqlInterviewQuestions #sqlInterviewQuestionsForTesting #sqlInterviewQuestionsQuery #sqlTechnicalInterviewQuestions