Find the Best Cosmetic Hospitals

Explore trusted cosmetic hospitals and make a confident choice for your transformation.

“Invest in yourself — your confidence is always worth it.”

Explore Cosmetic Hospitals

Start your journey today — compare options in one place.

What is the best way to learn SQL for data analyst?

Fundamental SQL Statements

  1. Create: creating a basic table involves naming the table and defining its columns and each column’s data type.
    Syntax :
    CREATE TABLE “table_name”(
    “column 1” “data type for column 1” [column 1 constraint(s)],
    “column 2” “data type for column 2” [column 2 constraint(s)],
    ……
    “column n”
    [“table constraint(s)”]);

Example :
create table Engineer_table (
Cust_id int,
First_name varchar,
Last_name varchar,
age int,
email_id varchar);
)

Constraints define the type of data which will be entered into the table column.
Now I am defining the type of Constraints, so please look below for a better understanding of constraints:

  1. NOT NULL Constraint: Ensures that a column cannot have NULL value.
  2. DEFAULT Constraint: Provides a default value for a column when none is specified.
  3. UNIQUE Constraint: Ensures that all values in a column are different.
  4. CHECK Constraint: Makes sure that all values in a column satisfy certain criteria.
  5. Primary Key Constraint: Used to uniquely identify a row in the table.
  6. Foreign Key Constraint: used to ensure referential integrity of the data.

Keys

  • A primary key is used to uniquely identify each row in a table and consist of one or more columns on a table.
  • When multiple columns are used as a primary key, they are called a composite key.
  • A foreign key is a column( or columns) that references a column (most often the primary key) of another table.

2. INSERT: The INSERT INTO statement is used to add new records into a database table.

Syntax:
INSERT INTO “table_name” (“column1″,”column2”,…) VALUES(“value1″,”value2”,…);

Example:
Single row (without column names specified)
INSERT INTO customer_table
VALUES(1, ‘chandan’,’Kumar’,23,’chandan@devopsschool.com’);

Single row (with column name specified)
INSERT INTO customer_table(cust_id,first_name,last_name,age,email_id)
VALUES(2, ‘Ajay’,’Kumar’,24,’ajay@devopsschool.com’);

Multiple rows
INSERT INTO customer_table
VALUES (1,’ck’,’dk’,35,’az@xyz.com’),
(2,’ak’,’pj’,36,’hg@xyz.com’);


Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services — all in one place.

Explore Hospitals
MotoShare.in provides the perfect two-wheeler for every occasion—daily commuting, weekend escapes, tourist exploration, or test-riding your dream bike. Simplify your mobility with us!

Related Posts

What is CodeIgniter and use cases of CodeIgniter?

What is CodeIgniter? CodeIgniter is an open-source PHP web application framework designed to simplify and accelerate web development. It follows the Model-View-Controller (MVC) architectural pattern and provides…

Read More

What is PHP and use cases of PHP?

What is PHP? Are you wondering what PHP is and how it works? Look no further! In this article, we will explore the ins and outs of…

Read More

Complete guide on PHP certification courses, tutorials & training

What is PHP Hypertext Preprocessor is known as PHP. Many developers use PHP, an open-source server-side programming language, to create websites. In addition, it is a general-purpose…

Read More

Complete PHP with Laravel Certification Guide & tutorials

What is PHP with Laravel? PHP was visioned eventually in the fall of 1994 by Rasmus Lerdorf. PHP means Hypertext Preprocessor. It’s a extensively- used, open source…

Read More

Top 50 PHP Interview Questions and Answers

1) What is PHP? PHP is an open-source, interpreted, and object-oriented scripting language that can be executed at the server-side. PHP is well suited for web development….

Read More

Complete guide of PHP certification courses, tutorials & training

PHP is a great beginner programming language for anyone who is wanting to cross over into the coding world. Though easy to learn, it is an extremely…

Read More