[Database learning from scratch] 3. SQL language

SQL basic concepts

Insert picture description here
In MSSQL , a schema is created to classify tables in the same database. For example, in a schema named Teacher, tables such as Tid, Tname can be stored, and in the schema of Student, Sid, Sname, etc. can be stored table. To put it bluntly, creating multiple schemas is to classify multiple tables to facilitate management

but! In MySQL , creating scheam and creating a database actually mean the same thing. Let’s test it with Navicat

Create a pattern

Insert picture description here

After running, there is an additional schematest database

Insert picture description here


SQL basic syntax

Here first learn how to operate a table, and learn how to manipulate the data in the table.

1. Manipulate the table

All possible operations on a table

Insert picture description here
The integrity constraints will be discussed in detail in the fifth part
Insert picture description here

I put some table operations that are not in the book here
Insert picture description here


2. Manipulate data

Nothing to say, here is a picture I made before
Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_44062380/article/details/106957131