Top 10 SQL Commands You Should Know

Top 10 SQL Commands You Should Know

SQL, which stands for Structured Query Language, is a programming language that helps manage data stored in relational databases

CREATE TABLE

CREATE TABLE

CREATE TABLE table_name (  column_1 datatype_1,  column_2 datatype_2,  column_3 datatype_3 );

This command allows you to create a new database or table

ALTER TABLE

ALTER TABLE

ALTER TABLE table_name ADD column_name datatype;

Run this command to modify (add, drop, rename, etc) the structure

DELETE

DELETE

ALTER TABLE table_name ADD column_name datatype;

Run this command to modify (add, drop, rename, etc) the structure

TABLE UPDATE table_name SET some_column = some_value WHERE some_column = some_value;table_name;

UPDATE

UPDATE

DROP deletes a database or table

Every query begins with SELECT; this is how you grab data from your database

SELECT

SELECT

SELECT column_name FROM table_name;

SELECT column_naINSERT INTO table_name (column_1, column_2, column_3) VALUES (value_1, value_2, value_3);me FROM table_name;

add new records to your table

INSERT INTO

INSERT INTO

SELECT column_name AS 'Alias' FROM table_name;

allows you to use a temporary alias when referring to a column or table.

allows you to use a temporary alias when referring to a column or table.

AS

SELECT column_name AS 'Alias' FROM table_name;

allows you to use a temporary alias when referring to a column or table.

allows you to use a temporary alias when referring to a column or table.

AS

SELECT COUNT(column_name) FROM table_name;

Use the COUNT() function to add up the number of rows where the specified column is not NULL

COUNT

COUNT

operator filters the results to be within a specified range

SELECT column_name(s) FROM table_name WHERE column_name BETWEEN value_1 AND value_2;

BETWEEN

BETWEEN

MOST TRUSTED EDUCATION PLATFORM  IN UTTARAKHAND

BEST DATA ANALYTICS TRAINING  IN UTTARAKHAND

+919411778145