100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Summary

Summary SQL Programming Language NOTES

Rating
-
Sold
-
Pages
44
Uploaded on
28-02-2025
Written in
2023/2024

All you need to know to be proficient at coding in SQL

Institution
Sql
Course
Sql











Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
Sql
Course
Sql

Document information

Uploaded on
February 28, 2025
Number of pages
44
Written in
2023/2024
Type
Summary

Content preview

SQL
Created @December 18, 2023 8:48 PM

Status Open

Updated @February 7, 2024 3:31 PM




SQL 1

, SQL

INTRODUCTION

SQL —> Structured Query Language —> programming language designed to
manage data stored in relational databases used for…

web frameworks

database applications




MANIPULATION


Relational Databases —>
Syntax

-- relational database --> one table

SELECT * FROM celebs;


relational databases —> database that organizes information into one or more
tables

table —> collection of data organized into rows and columns. —> referred to as
relations

EX: celebs

column —> set of data values of a particular type

EX: id, name, age

row —> single record in a table

EX: id = 1, name = Justin Bieber, age = 22


SQL 2

, All data stored in a relational database is of a certain data type

DATA TYPES

INTEGER —> positive or negative whole number

TEXT —> text string

DATE —> date formatted as YYYY-MM-DD

REAL —> decimal value



Statements —>
statement —> text that the database recognizes as a valid command —> end in a
semicolon (;)

Syntax

CREATE TABLE table_name (
column_1 data_type,
column_2 data_type,
column_3 data_type
);




clause —> perform specific tasks in SQL —> referred to as commands

written in capital letters

EX: CREATE TABLE

table_name —> refers to the name of the table that the command is applied to

parameter —> list of columns, data types, or values that are passed to a clause as
an argument

separated with commas

EX: (column_1 data_type, column_2 data_type…) —> the parameter




SQL 3

, structure of SQL statements —> vary

number of lines does not matter

statement can be written all on one line, or split up across multiple lines



Create —>
CREATE statements allow us to create a new table in the database

enclosed by parentheses and ends with a semicolon

Syntax

CREATE TABLE celebs (
id INTEGER,
name TEXT,
age INTEGER
);

-- celebs --> name of the table
-- (id INTEGER, name TEXT, age INTEGER) --> list of parameters defining
-- each column, or attribute in the table and its data type

CREATE TABLE —> clause that creates a new table

id —> first column in the table that stores an INTEGER

name —> second column in the table that stores a TEXT
age —> third column in the table that stores an INTEGER



Insert —>
INSERT statement inserts a new row into a table

INSERT INTO

VALUES



SQL 4
$3.49
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Get to know the seller
Seller avatar
martinsokorie

Get to know the seller

Seller avatar
martinsokorie University Of Maryland - College Park
View profile
Follow You need to be logged in order to follow users or courses
Sold
0
Member since
9 months
Number of followers
0
Documents
3
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions