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:
- Windows 11 OS
- 8GB RAM
- 256GB SSD ROM
- 1TB HDD ROM
- CPU Intel Core i5
Steps:
- 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.
- Open Microsoft SQL Server Management Studio and select Server Type, Server Name, and Authentication mode to connect with your server.
- 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:
- Once executed, type this one:
- To view the table we just created, type:
- Now, make changes by adding or deleting columns, rows and tables according to your choice.
CREATE TABLE countries ( name VARCHAR(255) NOT NULL, capital VARCHAR(255) NOT NULL, president VARCHAR(255) NOT NULL, PRIMARY KEY (name) );
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');
SELECT * FROM countries;