<thead id="xthz1"></thead>
            <form id="xthz1"></form>

                <sub id="xthz1"><meter id="xthz1"></meter></sub><thead id="xthz1"><meter id="xthz1"></meter></thead>

                <thead id="xthz1"><meter id="xthz1"></meter></thead>

                <th id="xthz1"></th>

                  <font id="xthz1"><meter id="xthz1"><i id="xthz1"></i></meter></font>

                          <nobr id="xthz1"><meter id="xthz1"></meter></nobr>

                          <th id="xthz1"><meter id="xthz1"></meter></th>

                          <nobr id="xthz1"></nobr>

                                  <nobr id="xthz1"><meter id="xthz1"><var id="xthz1"></var></meter></nobr>

                                  <th id="xthz1"></th>
                                  <thead id="xthz1"><meter id="xthz1"><b id="xthz1"></b></meter></thead>
                                  
                                  

                                      <pre id="xthz1"><noframes id="xthz1"><track id="xthz1"></track>

                                          <nobr id="xthz1"><meter id="xthz1"><var id="xthz1"></var></meter></nobr>

                                          <th id="xthz1"></th>

                                            <address id="xthz1"></address>

                                            <thead id="xthz1"><meter id="xthz1"></meter></thead>

                                                <video id="xthz1"><span id="xthz1"><nobr id="xthz1"></nobr></span></video>

                                                  <th id="xthz1"><meter id="xthz1"></meter></th>

                                                  <th id="xthz1"></th>

                                                    <th id="xthz1"></th><track id="xthz1"><meter id="xthz1"></meter></track>

                                                      <font id="xthz1"><meter id="xthz1"></meter></font><th id="xthz1"><meter id="xthz1"></meter></th>

                                                          <sub id="xthz1"><progress id="xthz1"></progress></sub>

                                                              <sub id="xthz1"></sub>

                                                                          <track id="xthz1"><meter id="xthz1"></meter></track>
                                                                              當前位置 > 首頁 > 技術文檔 > 初識SQL語言

                                                                              初識SQL語言

                                                                              來源:CPDA數據分析師學習網 | 時間:2018-02-26 | 作者:數據分析學習網

                                                                              SQL呢,我們都知道它是一門語言,是一門鏈接數據庫的語言。那數據庫是什么呢?通俗來說就是很多表的集合。

                                                                              其次,SQL語言用于查詢,查詢數據庫中的表,表里的數據。但是也不僅僅限于查詢,我們還可以利用SQL增加、修改、刪除我們的數據庫、表和數據。那么接下來,我們簡單介紹一下SQL的基礎語句。

                                                                              首先,SQL是不分大小寫的,這與Python、R等有著一定區別,好比創建你可以寫create/CREATE都可以的。

                                                                              讓我們先看一條創建數據庫的語句吧。(這里我用的是MySQL Workbench,讀者可以自行選擇編輯器,百度就可以了)。

                                                                              1519623948(1)

                                                                              這樣呢,我們就創建了一個名為test的數據庫,利用的命令就是:create database,在我的編輯器上SQL命令是藍色的,創建的名稱等都是黑色的,還是很容易區分的。

                                                                              然后,我們看到下圖用紅色方框畫出的部分就是我現有的所有數據庫,test就在其中。

                                                                              1519624122

                                                                              接著,我們在test中創建一張表。首先,我們用use test表示我們要在test這個數據庫里創建表;然后,我們用create table? 表名(表的列名、數據類型、是否為空等)設置創建的表的樣子。

                                                                              1519624876(1)

                                                                              那我們來看看,我們創建的表吧。用select*from 表名,查看表中所有數據,如果只需要查看部分數據,把*換成你要查看的列名就可以了。像下面第二張圖那樣。

                                                                              1519625297

                                                                              1519625419(1)

                                                                              我們表創建好啦,接著就是給表添加數據了。用insert into 表名 values(記錄1,記錄2……)的語句進行逐行添加。下圖紅色方框畫出的就是一條記錄。當然,這只是添加數據的一種寫法,還有其他寫法小伙伴可以自學。第二張圖就是我們添加數據之后的表了。

                                                                              1519625657(1)

                                                                              1519625761(1)

                                                                              這樣,我們就學會創建一個數據庫,以及在數據庫中創建表和給表添加數據了。趕快下載一個編輯器來練習一下吧!

                                                                               

                                                                               

                                                                                      <thead id="xthz1"></thead>
                                                                                        <form id="xthz1"></form>

                                                                                            <sub id="xthz1"><meter id="xthz1"></meter></sub><thead id="xthz1"><meter id="xthz1"></meter></thead>

                                                                                            <thead id="xthz1"><meter id="xthz1"></meter></thead>

                                                                                            <th id="xthz1"></th>

                                                                                              <font id="xthz1"><meter id="xthz1"><i id="xthz1"></i></meter></font>

                                                                                                      <nobr id="xthz1"><meter id="xthz1"></meter></nobr>

                                                                                                      <th id="xthz1"><meter id="xthz1"></meter></th>

                                                                                                      <nobr id="xthz1"></nobr>

                                                                                                              <nobr id="xthz1"><meter id="xthz1"><var id="xthz1"></var></meter></nobr>

                                                                                                              <th id="xthz1"></th>
                                                                                                              <thead id="xthz1"><meter id="xthz1"><b id="xthz1"></b></meter></thead>
                                                                                                              
                                                                                                              

                                                                                                                  <pre id="xthz1"><noframes id="xthz1"><track id="xthz1"></track>

                                                                                                                      <nobr id="xthz1"><meter id="xthz1"><var id="xthz1"></var></meter></nobr>

                                                                                                                      <th id="xthz1"></th>

                                                                                                                        <address id="xthz1"></address>

                                                                                                                        <thead id="xthz1"><meter id="xthz1"></meter></thead>

                                                                                                                            <video id="xthz1"><span id="xthz1"><nobr id="xthz1"></nobr></span></video>

                                                                                                                              <th id="xthz1"><meter id="xthz1"></meter></th>

                                                                                                                              <th id="xthz1"></th>

                                                                                                                                <th id="xthz1"></th><track id="xthz1"><meter id="xthz1"></meter></track>

                                                                                                                                  <font id="xthz1"><meter id="xthz1"></meter></font><th id="xthz1"><meter id="xthz1"></meter></th>

                                                                                                                                      <sub id="xthz1"><progress id="xthz1"></progress></sub>

                                                                                                                                          <sub id="xthz1"></sub>

                                                                                                                                                      <track id="xthz1"><meter id="xthz1"></meter></track>
                                                                                                                                                          快3赚钱方法如下

                                                                                                                                                                  <thead id="xthz1"></thead>
                                                                                                                                                                    <form id="xthz1"></form>

                                                                                                                                                                        <sub id="xthz1"><meter id="xthz1"></meter></sub><thead id="xthz1"><meter id="xthz1"></meter></thead>

                                                                                                                                                                        <thead id="xthz1"><meter id="xthz1"></meter></thead>

                                                                                                                                                                        <th id="xthz1"></th>

                                                                                                                                                                          <font id="xthz1"><meter id="xthz1"><i id="xthz1"></i></meter></font>

                                                                                                                                                                                  <nobr id="xthz1"><meter id="xthz1"></meter></nobr>

                                                                                                                                                                                  <th id="xthz1"><meter id="xthz1"></meter></th>

                                                                                                                                                                                  <nobr id="xthz1"></nobr>

                                                                                                                                                                                          <nobr id="xthz1"><meter id="xthz1"><var id="xthz1"></var></meter></nobr>

                                                                                                                                                                                          <th id="xthz1"></th>
                                                                                                                                                                                          <thead id="xthz1"><meter id="xthz1"><b id="xthz1"></b></meter></thead>
                                                                                                                                                                                          
                                                                                                                                                                                          

                                                                                                                                                                                              <pre id="xthz1"><noframes id="xthz1"><track id="xthz1"></track>

                                                                                                                                                                                                  <nobr id="xthz1"><meter id="xthz1"><var id="xthz1"></var></meter></nobr>

                                                                                                                                                                                                  <th id="xthz1"></th>

                                                                                                                                                                                                    <address id="xthz1"></address>

                                                                                                                                                                                                    <thead id="xthz1"><meter id="xthz1"></meter></thead>

                                                                                                                                                                                                        <video id="xthz1"><span id="xthz1"><nobr id="xthz1"></nobr></span></video>

                                                                                                                                                                                                          <th id="xthz1"><meter id="xthz1"></meter></th>

                                                                                                                                                                                                          <th id="xthz1"></th>

                                                                                                                                                                                                            <th id="xthz1"></th><track id="xthz1"><meter id="xthz1"></meter></track>

                                                                                                                                                                                                              <font id="xthz1"><meter id="xthz1"></meter></font><th id="xthz1"><meter id="xthz1"></meter></th>

                                                                                                                                                                                                                  <sub id="xthz1"><progress id="xthz1"></progress></sub>

                                                                                                                                                                                                                      <sub id="xthz1"></sub>

                                                                                                                                                                                                                                  <track id="xthz1"><meter id="xthz1"></meter></track>

                                                                                                                                                                                                                                              <thead id="xthz1"></thead>
                                                                                                                                                                                                                                                <form id="xthz1"></form>

                                                                                                                                                                                                                                                    <sub id="xthz1"><meter id="xthz1"></meter></sub><thead id="xthz1"><meter id="xthz1"></meter></thead>

                                                                                                                                                                                                                                                    <thead id="xthz1"><meter id="xthz1"></meter></thead>

                                                                                                                                                                                                                                                    <th id="xthz1"></th>

                                                                                                                                                                                                                                                      <font id="xthz1"><meter id="xthz1"><i id="xthz1"></i></meter></font>

                                                                                                                                                                                                                                                              <nobr id="xthz1"><meter id="xthz1"></meter></nobr>

                                                                                                                                                                                                                                                              <th id="xthz1"><meter id="xthz1"></meter></th>

                                                                                                                                                                                                                                                              <nobr id="xthz1"></nobr>

                                                                                                                                                                                                                                                                      <nobr id="xthz1"><meter id="xthz1"><var id="xthz1"></var></meter></nobr>

                                                                                                                                                                                                                                                                      <th id="xthz1"></th>
                                                                                                                                                                                                                                                                      <thead id="xthz1"><meter id="xthz1"><b id="xthz1"></b></meter></thead>
                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                      

                                                                                                                                                                                                                                                                          <pre id="xthz1"><noframes id="xthz1"><track id="xthz1"></track>

                                                                                                                                                                                                                                                                              <nobr id="xthz1"><meter id="xthz1"><var id="xthz1"></var></meter></nobr>

                                                                                                                                                                                                                                                                              <th id="xthz1"></th>

                                                                                                                                                                                                                                                                                <address id="xthz1"></address>

                                                                                                                                                                                                                                                                                <thead id="xthz1"><meter id="xthz1"></meter></thead>

                                                                                                                                                                                                                                                                                    <video id="xthz1"><span id="xthz1"><nobr id="xthz1"></nobr></span></video>

                                                                                                                                                                                                                                                                                      <th id="xthz1"><meter id="xthz1"></meter></th>

                                                                                                                                                                                                                                                                                      <th id="xthz1"></th>

                                                                                                                                                                                                                                                                                        <th id="xthz1"></th><track id="xthz1"><meter id="xthz1"></meter></track>

                                                                                                                                                                                                                                                                                          <font id="xthz1"><meter id="xthz1"></meter></font><th id="xthz1"><meter id="xthz1"></meter></th>

                                                                                                                                                                                                                                                                                              <sub id="xthz1"><progress id="xthz1"></progress></sub>

                                                                                                                                                                                                                                                                                                  <sub id="xthz1"></sub>

                                                                                                                                                                                                                                                                                                              <track id="xthz1"><meter id="xthz1"></meter></track>