본문 바로가기
Study Note/SQL

Understanding database and SQL

by jhleeatl 2024. 3. 19.

What is SQL and database

 

SQL stands for Structured Query Language, a standardized programming language used to manage data in relational database management systems (RDBMS). A database is an organized collection of data stored electronically, designed to efficiently manage and retrieve data for applications and users.

 

 

I learned about handling tables, which gather data, and the way columns, which are the internal classifications, are dealt with.

 

I covered querying, sorting, renaming attributes (columns), and proposed ways to utilize them.

 

 

As an example,

select * or select 'column' --This is the line to select the column in the data
from 'Name of table'
where 'column' = (Indexing specified data values) (range and filter <, >, <=, >=, <>)

 

 

Practice exercise:  Filtering data with multiple conditions

Retrieve records from the food_orders table where the cuisine is Korean and the price is 30,000 won or more.

 

SELECT *
FROM food_orders fo 
WHERE cuisine_type='Korean'
and price>=30000

 

 

Result

 

 

Question:

Would it be possible to use a formula on a created column?

 

+Yes it is possible to use newly created column by using Subquery

'Study Note > SQL' 카테고리의 다른 글

NULL value  (0) 2024.03.22
Left Join & Inner Join  (0) 2024.03.21
Subquery  (0) 2024.03.21
Replace Data in SQL and IF Statements  (0) 2024.03.20
Calculating/Categorizing/Sorting  (0) 2024.03.20