成人无码视频,亚洲精品久久久久av无码,午夜精品久久久久久毛片,亚洲 中文字幕 日韩 无码

資訊專欄INFORMATION COLUMN

初學(xué)MySQL,基礎(chǔ)使用教程

brianway / 767人閱讀

摘要:前端狗初學(xué),記錄一下用戶登錄查看數(shù)據(jù)庫創(chuàng)建數(shù)據(jù)庫進入數(shù)據(jù)庫查看數(shù)據(jù)庫中的所有表創(chuàng)建表信息設(shè)置作為主鍵,的值不能為空,的默認值是,備注為信息。查看表結(jié)構(gòu)查看表格創(chuàng)建信息查看表數(shù)據(jù)插入數(shù)據(jù)二哈計算機刪除數(shù)據(jù)修改數(shù)據(jù)物聯(lián)網(wǎng)

前端狗初學(xué)MySQL,記錄一下
1、用戶登錄:

mysql -uroot -p

2、查看數(shù)據(jù)庫:

show databases;

3、創(chuàng)建數(shù)據(jù)庫:

create database firstsql;

4、進入數(shù)據(jù)庫:

use firstsql

5、查看數(shù)據(jù)庫中的所有表:

show tables;

6、創(chuàng)建表:

create table student(
  ID char(7) primary key,
  NAME varchar(20) not null,
  Age varchar(20) default "10"
)comment="信息";

設(shè)置ID作為主鍵,NAME的值不能為空,Age 的默認值是10,備注為信息。
7、查看表結(jié)構(gòu)

desc firstsql.student;

8、查看表格創(chuàng)建信息

show create table student;

9、查看表數(shù)據(jù)

select * from student;
select ID,NAME,Age from Student;
select * from Student where ID="001";

10、插入數(shù)據(jù)

insert into student values ("001","二哈","計算機");

11、刪除數(shù)據(jù)

delete from student;
delete from student where ID="001";

12、修改數(shù)據(jù)

update student set NAME="物聯(lián)網(wǎng)" where ID="001";

文章版權(quán)歸作者所有,未經(jīng)允許請勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。

轉(zhuǎn)載請注明本文地址:http://m.hztianpu.com/yun/98647.html

相關(guān)文章

  • MySQL入門教程 - 收藏集 - 掘金

    摘要:數(shù)據(jù)庫數(shù)據(jù)庫入門教程系列工具掘金工具共同編輯,修正錯誤,這里點擊進去在這里持續(xù)更新由于軟件是基于模式的數(shù)據(jù)庫管理系統(tǒng)一個客戶機服務(wù)器,因此在日常各種工作中,可以通過各種客戶端軟件來與數(shù)據(jù)庫管理系統(tǒng)關(guān)聯(lián)。 MySQL入門教程系列-1.5 如何學(xué)習(xí)MySQL - 掘金 在這里持續(xù)更新 MySQL入門教程系列-1.5 如何學(xué)習(xí)MySQL 如何學(xué)習(xí) MySQL 這是一個偽命題,每個人都有適合自...

    張利勇 評論0 收藏0

發(fā)表評論

0條評論

閱讀需要支付1元查看
<