B1 中級 1090 タグ追加 保存
動画の字幕をクリックしてすぐ単語の意味を調べられます!
単語帳読み込み中…
字幕の修正報告
hi guys welcome to this tutorial and in this tutorial we will focus on
how to insert data into the table we created last time
so I have already
browsed through to the folder where my MySQL application is present
so now i have to connect to my MySQL server so I will do mysql
-u username (i.e. root)
-p password (i.e. no password)
-h hostname (i.e. 127.0.0.1 or localhost)
I don't have a password so I will just press Enter
It says you are connected to MySQL
if in your case it is showing that
some error has occured then
just go ahead and open up u'r XAMPP control panel
and check here if the MySQL server is running. If it's not running then click on start.
So, in the last tutorial we created a database named userlogin. Inside that
databse we created a table called
user and inside that table we inserted some parameters
4 parameters actually
id, username, password and email. So, in this tutorial we will just insert
data into that table
So, first of all I will do a show databases.
show databases;
There it is
userlogin
Now again I will
write use userlogin;
and then show tables;
So, there is just one table. Now describe
user;
So, here it is. 4 parameters are present id, username, password and email.
and these are the characteristics of those parameters. And in this tutorial we will just
insert data into those fields.
So lets start by writing Insert
into
our table name is user
and I will start the paranthesis here
We don't have to insert the value of ID because, it is set to auto-increment. So it
will automatically increase. We will just have to insert the value of
username
password
and email
just press Enter here and here I will write my values.
So, our username is a Varchar of 25 chars. So for varchar you
have to use single quotes
Remember that you have to use only single quotes because double quotes won't work
for MySQL. Suppose my username is 'primetuber'
Comma
my password will be
12345
and suppose my email-ID is
[email protected]
Now I will close my paranthesis here
end those statements and press enter.
it says query Ok and 1 rows affected.Now we have inserted values into our table
and we can see those values by typing in
SELECT * FROM user;
So, here it is
ID = 1, username = primetuber, password =12345
and email = [email protected] Now I will
another set of data into this table. So I will write INSERT
INTO
our table name is user
and id, I don't have to enter
So, username
then password
and email
i don't have to press Enter. I can just write values
and I will start with username
suppose username is java
password is
javanet
and email-ID is [email protected]
we will end the paranthesis
add semicolon and press Enter
It says query OK. 1 row affected. Now to see all the data present in the
table I will write
SELECT
*
FROM user
and add semicolon and press Enter.
so here it is. When ID is 1 username is primetuber password is 12345 and email is this
When ID is 2 username is java password is javanet and email is this
So, this is for this tutorial and in the next tutorial
We will talk about more about updating a database and Selecting from databases.
so thank you for my video and if u like the video don't forget to subscribe
コツ:単語をクリックしてすぐ意味を調べられます!

読み込み中…

MySQL Tutorial for Beginners - 2 - Adding Data to Tables in a Database

1090 タグ追加 保存
陳柏霖 2015 年 2 月 13 日 に公開
お勧め動画
  1. 1. クリック一つで単語を検索

    右側のスプリクトの単語をクリックするだけで即座に意味が検索できます。

  2. 2. リピート機能

    クリックするだけで同じフレーズを何回もリピート可能!

  3. 3. ショートカット

    キーボードショートカットを使うことによって勉強の効率を上げることが出来ます。

  4. 4. 字幕の表示/非表示

    日・英のボタンをクリックすることで自由に字幕のオンオフを切り替えられます。

  5. 5. 動画をブログ等でシェア

    コードを貼り付けてVoiceTubeの動画再生プレーヤーをブログ等でシェアすることが出来ます!

  6. 6. 全画面再生

    左側の矢印をクリックすることで全画面で再生できるようになります。

  1. クイズ付き動画

    リスニングクイズに挑戦!

  1. クリックしてメモを表示

  1. UrbanDictionary 俚語字典整合查詢。一般字典查詢不到你滿意的解譯,不妨使用「俚語字典」,或許會讓你有滿意的答案喔