How to set up a server for learning SQL

Nov 11, 2023

by Pranay

Importance of SQL:

SQL is a programming language that helps you store, retrieve, and manipulate the data in a database. Most apps and programs that work with data have one or more databases working in the background. To converse with these databases, you need SQL.

My Computer Specifications:

Steps:

  1. First, go to the official Microsoft website and download SSMS software from this link. Its latest version is 19.1. Install it on your PC.
  2. Open Microsoft SQL Server Management Studio and select Server Type, Server Name, and Authentication mode to connect with your server.
  3. Once connected, you will see a list of folders in the left side of the window. Click New Query located in the top menu. Type the below code:
  4.                 CREATE TABLE countries (
                        name VARCHAR(255) NOT NULL,
                        capital VARCHAR(255) NOT NULL,
                        president VARCHAR(255) NOT NULL,
                        PRIMARY KEY (name)
                    );
                
  5. Once executed, type this one:
  6.                 INSERT INTO countries (name, capital, president) VALUES
                        ('India', 'New Delhi', 'Droupadi Murmu'),
                        ('United States', 'Washington, D.C.', 'Joe Biden'),
                        ('China', 'Beijing', 'Xi Jinping'),
                        ('Brazil', 'Brasília', 'Jair Bolsonaro'),
                        ('Russia', 'Moscow', 'Vladimir Putin'),
                        ('Indonesia', 'Jakarta', 'Joko Widodo'),
                        ('Mexico', 'Mexico City', 'Andrés Manuel López Obrador'),
                        ('Japan', 'Tokyo', 'Fumio Kishida'),
                        ('Germany', 'Berlin', 'Olaf Scholz'),
                        ('France', 'Paris', 'Emmanuel Macron'),
                        ('United Kingdom', 'London', 'Rishi Sunak');
                
  7. To view the table we just created, type:
  8. SELECT * FROM countries;
  9. Now, make changes by adding or deleting columns, rows and tables according to your choice.
Author Avatar

Pranay Makkena

I am proficient in programming languages like Python and Java, React library and I also have expertise in marketing, including SEO and Social Media Marketing.