第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
  • 語句以;分號(hào)結(jié)尾

    查看全部
  • 數(shù)據(jù)庫類型:關(guān)系型數(shù)據(jù)庫、非關(guān)系型數(shù)據(jù)庫
    什么是關(guān)系型數(shù)據(jù)庫?
    以表的形式存儲(chǔ)數(shù)據(jù),表與表之間可以有很多復(fù)雜的關(guān)系
    什么是非關(guān)系型數(shù)據(jù)庫?
    以數(shù)據(jù)集的關(guān)系存儲(chǔ)數(shù)據(jù),大量的數(shù)據(jù)集中存儲(chǔ)在一起


    c3f1d26708d6732909600540.jpg
    查看全部
    0 采集 收起 來源:初識(shí) MySQL

    2025-03-16

  • foreign key: 外鍵約束---如果一張表中的一個(gè)字段指向了另一張表中的主鍵,就將該字段叫做外鍵;外鍵的數(shù)據(jù)類型必須和指向的主鍵一致;定義外鍵的表稱為從表,被外鍵引用的表稱為主表

    create table if not exists user(

    ????id int unsigned primary key auto_increment,

    ????username varchar(20) not null

    )

    desc user;

    create table if not exists dynamic(

    ????id int unsigned primary key auto_increment,

    ????content varchar(255) not null,

    ????user_id int unsigned

    )

    ?

    create table if not exists dynamic_1(

    ????id int unsigned primary key auto_increment,

    ????content varchar(255) not null,

    ????user_id int unsigned,

    ????foreign key(user_id) references user(id)

    )

    https://img1.sycdn.imooc.com/f453166709cc547310890366.jpg

    create table if not exists dynamic_2(

    ????id int unsigned primary key auto_increment,

    ????content varchar(255) not null,

    ????user_id int unsigned,

    ????foreign key(user_id) references user(id) on update cascade on delete set null

    )

    查看全部
  • SQL約束

    SQL約束:

    • primary key:主鍵約束? ?--- 1、區(qū)分記錄的唯一性;2、值不能重復(fù)也不能為空;3、一張表中只能有一個(gè)主鍵;4、同時(shí)將多個(gè)字段作為一個(gè)主鍵來使用,多個(gè)字段聯(lián)合起來的值不能重復(fù)

    ????????例:?

    ????????create table if not exists stu1 (

    ????????????id int unsigned primary key,

    ????????????name varchar(20)

    ?????????)

    ????????create table if not exists stu2 (

    ????????????id int unsigned,

    ????????????name varchar(20),

    ????????????primary key(id)

    ?????????)

    ????????create table if not exists stu2 (

    ????????????id int unsigned,

    ????????????name varchar(20),

    ????????????primary key(id,name)

    ?????????)

    • auto_increment:自動(dòng)遞增

    ????create table if not exists stu6 (

    ????????????id int unsigned primary key auto_increment,

    ????????????name varchar(20),

    ?????????)

    • unique: 唯一約束: 1、保證某個(gè)字段值永遠(yuǎn)不重復(fù);2、允許多個(gè)NULL值存在;3、一張表中只能有一個(gè)主鍵,但是可以有多個(gè)unique

    ????????create table if not exists stu7 (

    ????????????id int unsigned?primary key?auto_increment,

    ????????????name varchar(20) unique,

    ?????????)

    • not null:非空約束

    ????????create table if not exists stu8 (

    ????????????id int unsigned?primary key?auto_increment,

    ????????????name varchar(20)? not null,

    ?????????)

    • default:默認(rèn)值

    ????????create table if not exists stu9 (

    ????????????id int unsigned?primary key?auto_increment,

    ????????????name varchar(20)??not null,

    ????????????gender enum('男', '女', '保密') default '保密'

    ????????????createdAt timestamp default current_timestamp

    ????????????updateAt?timestamp default current_timestamp on update?current_timestamp

    ?????????)

    • foreign key:外鍵約束


    ????

    查看全部
    0 采集 收起 來源:SQL 約束

    2025-03-08

  • https://img1.sycdn.imooc.com/a8e9c26709c9a06413150764.jpg

    查詢數(shù)據(jù)表(查)--查找當(dāng)前使用的數(shù)據(jù)庫

    select database()

    選擇數(shù)據(jù)庫

    use demo

    查看當(dāng)前數(shù)據(jù)庫中的所有表

    show? tables

    查看表結(jié)構(gòu)

    desc student;?

    創(chuàng)建數(shù)據(jù)表(增)

    create table if not exists student (

    id int unsigned,

    name varchar(20)

    age tinyint unsigned

    gender enum('男','女','保密')

    createAt timestamp

    )

    已存在才刪除表

    drop table if exist student

    修改數(shù)據(jù)表

    alter table student rename to stu?修改表名

    添加字段

    alter table student add updatedAt? timestamp

    刪除字段

    alter? table student drop updateAt

    修改字段的數(shù)據(jù)類型

    alter talbe student modify createdAt datetime

    修改字段的名稱和數(shù)據(jù)類型

    alter table student change?createdAt??createAt? timestamp

    查看全部
  • SQL數(shù)據(jù)類型:

    什么是SQL數(shù)據(jù)類型?

    • 數(shù)字、字符串、日期時(shí)間等類型

    為什么需要數(shù)據(jù)類型?

    • 告訴數(shù)據(jù)庫以多大的儲(chǔ)存空間儲(chǔ)存數(shù)據(jù)

    • 合理分配儲(chǔ)存空間

    常見的SQL數(shù)據(jù)類型有哪些?

    • 數(shù)字類型:整型、浮點(diǎn)型、定點(diǎn)型等

    • 字符串類型:字符型、文本型、枚舉型、集合型等

    • 日期時(shí)間類型:日期型、日期時(shí)間型、時(shí)間戳型等

    整數(shù)類型:

    • 專門用來保存整數(shù)

    • 區(qū)分有符號(hào)和無符號(hào),默認(rèn)是有符號(hào)的(有符號(hào)可以表示負(fù)數(shù),無符號(hào)不能表示負(fù)數(shù))

    • 可以在數(shù)據(jù)類型后加上unsigned表示無符號(hào)

    https://img1.sycdn.imooc.com/8bf7ef6709c946b810070496.jpg

    https://img1.sycdn.imooc.com/f3faa16709c9476009390346.jpg

    https://img1.sycdn.imooc.com/ce853b6709c947c607250321.jpg

    https://img1.sycdn.imooc.com/df9d426709c947e905420168.jpg

    https://img1.sycdn.imooc.com/a2c7fb6709c9481408140285.jpg

    https://img1.sycdn.imooc.com/b92cfd6709c9482c09290118.jpg

    https://img1.sycdn.imooc.com/5b77ad6709c9483e10220529.jpg

    https://img1.sycdn.imooc.com/ae2a926709c95d4f08580272.jpg

    https://img1.sycdn.imooc.com/a027506709c95d6710370498.jpg

    https://img1.sycdn.imooc.com/ee0ed36709c966b411470613.jpg

    查看全部
  • https://img1.sycdn.imooc.com/dea5dd6709c935c206300446.jpg

    show databases;? ?顯示所有的數(shù)據(jù)庫

    select database(); 選擇使用的數(shù)據(jù)庫

    use demo;使用demo數(shù)據(jù)庫

    create database demo;? 創(chuàng)建一個(gè)數(shù)據(jù)庫(如果數(shù)據(jù)庫存在就會(huì)報(bào)錯(cuò))

    create database demo if not exists demo; 創(chuàng)建數(shù)據(jù)庫(如果數(shù)據(jù)庫存在就不會(huì)創(chuàng)建,否則就創(chuàng)建數(shù)據(jù)庫)推薦使用這種方式創(chuàng)建數(shù)據(jù)庫

    drop database demo; 刪除數(shù)據(jù)庫(如果存在就刪除,否則就會(huì)報(bào)錯(cuò))

    drop database if exists demo; 刪除數(shù)據(jù)庫(如果存在就刪除,不存也不會(huì)報(bào)錯(cuò))推薦使用這種方式

    alter database demo character set utf8mb4 collate utf8mb4_0900_ai_ci;

    utf8mb4 :字符集,兼容utf8,且比utf8 能表示更多的字符

    utf8mb4_0900_ai_ci:字符集對(duì)應(yīng)的排序規(guī)則,聲調(diào)/重音不敏感(accent insensitive),大小寫不敏感(case insensitive)

    查看全部
  • SQL規(guī)范https://img1.sycdn.imooc.com/9f8b576709c8076109520463.jpg

    查看全部
  • https://img1.sycdn.imooc.com/9241b16709c7b8f204440245.jpghttps://img1.sycdn.imooc.com/25baee6709c7b90a02850177.jpghttps://img1.sycdn.imooc.com/53ba246709c7ba4104860171.jpg

    https://img1.sycdn.imooc.com/bb47ac6709c7bb2004920179.jpghttps://img1.sycdn.imooc.com/30f2776709c7c26104360205.jpghttps://img1.sycdn.imooc.com/83a12b6709c7ca0704690234.jpghttps://img1.sycdn.imooc.com/ccab8a6709c7ca5102570234.jpghttps://img1.sycdn.imooc.com/a81fa56709c7cbc405550233.jpg記錄知識(shí)點(diǎn)

    查看全部
    0 采集 收起 來源:初識(shí) MySQL

    2025-03-05

  • --?顯示所有數(shù)據(jù)庫
    show?databases;
    --?查看當(dāng)前使用的數(shù)據(jù)庫
    select?database();
    
    --?使用數(shù)據(jù)
    use?mydemo;
    
    --?創(chuàng)建一個(gè)叫“mydemo”的數(shù)據(jù)庫
    create?database?mydemo;
    --?查詢是否存在一個(gè)叫“mydemo”的數(shù)據(jù)庫,沒有的話創(chuàng)建
    create?database?if?not?exists?mydemo;
    
    --?刪除數(shù)據(jù)庫
    drop?database?mydemo;
    --?查詢是否存在這個(gè)數(shù)據(jù)庫,存在刪除
    drop?database?if?exists?mydemo;
    
    --?修改數(shù)據(jù)庫“字符集”與“排序規(guī)則”
    alter?database?mydemo?character?set?utf8mb4?collate?utf8mb4_0900_ai_ci;
    --?utf8mb4:?字符集,兼容utf8,且比utf8能表達(dá)更多的字符
    --?utf8mb4_0900_ai_ci:字符集對(duì)應(yīng)的排序規(guī)則,聲調(diào)/重音不敏感,大小寫不敏感
    查看全部
  • 配置path環(huán)境變量設(shè)置,方便cmd指令直接運(yùn)行

    新建path變量地址

    查看全部
  • 查看當(dāng)前數(shù)據(jù)庫

    Select database

    查看全部
  • 顯示所有數(shù)據(jù)庫

    Show database;

    查看全部
  • show database

    查看全部
    • 什么是數(shù)據(jù)庫

    1. 存儲(chǔ)和管理數(shù)據(jù)的倉庫,本質(zhì)上就是一個(gè)軟件。

    2. 存儲(chǔ)和管理:對(duì)數(shù)據(jù)的增,刪,改,查。

    • 數(shù)據(jù)庫分為

    1. 關(guān)系型數(shù)據(jù)庫

    2. 非關(guān)系型數(shù)據(jù)庫

    • 關(guān)系型數(shù)據(jù)庫

    1. 是以表的形式存儲(chǔ)數(shù)據(jù),表與表之間可以有很多復(fù)雜關(guān)系

    2. MySQL,Oracle,SQL Server等

    • 非關(guān)系型數(shù)據(jù)庫

    1. 以數(shù)據(jù)集的方式存儲(chǔ)數(shù)據(jù),大量的數(shù)據(jù)集中存儲(chǔ)在一起

    2. MongoDB,Redis,Memcached等

    • 什么是MySQL

    1. 關(guān)系型數(shù)據(jù)庫

    2. 免費(fèi)開源的,也是最受歡迎的數(shù)據(jù)庫之一

    查看全部
    0 采集 收起 來源:初識(shí) MySQL

    2024-11-17

  • 6722f10f00019ae226881242.jpg

    6722f1110001e8e126881242.jpg

    6722f1130001161d26881242.jpg

    查看全部
  • 一、什么是數(shù)據(jù)庫
    1. 定義:
    數(shù)據(jù)庫本質(zhì)上為用來存儲(chǔ)和管理數(shù)據(jù)的軟件
    2. 類型:
    2.1 關(guān)系型數(shù)據(jù)庫:
    ????? 表形式存儲(chǔ)數(shù)據(jù),表和表之間可建立關(guān)系
    2.2 非關(guān)系型數(shù)據(jù)庫:
    ????? 數(shù)據(jù)集中在一起方式存儲(chǔ)數(shù)據(jù),非表形式
    二、什么是MySQL
    以表形式,持久存儲(chǔ)和管理數(shù)據(jù)的,關(guān)系型數(shù)據(jù)庫
    查看全部
    0 采集 收起 來源:初識(shí) MySQL

    2024-10-29

  • SQL約束,主表從表

    667ccfa000018f7217920828.jpg

    查看全部
  • SQL約束

    667ccf650001aa1b17920828.jpg

    查看全部

舉報(bào)

0/150
提交
取消
課程須知
對(duì)數(shù)據(jù)庫感興趣的所有人員都可學(xué)習(xí)。
老師告訴你能學(xué)到什么?
1、 初識(shí) MySQL 2、 認(rèn)識(shí) SQL 3、 MySQL 的安裝、啟動(dòng)和連接 4、 數(shù)據(jù)庫的增刪改查操作 5、 SQL 數(shù)據(jù)類型 6、 數(shù)據(jù)表的增刪改查操作 7、 SQL 約束 8、 SQL 約束--外鍵約束

微信掃碼,參與3人拼團(tuán)

微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)

友情提示:

您好,此課程屬于遷移課程,您已購買該課程,無需重復(fù)購買,感謝您對(duì)慕課網(wǎng)的支持!