B1 Intermediate Other 1094 Folder Collection
After playing the video, you can click or select the word to look it up in the dictionary.
Report Subtitle Errors
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. 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
Now again I will
write use userlogin;
and then show tables;
So, there is just one table. Now describe
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
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
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'
my password will be
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
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
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
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
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
    You must  Log in  to get the function.
Tip: Click on the article or the word in the subtitle to get translation quickly!


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

1094 Folder Collection
陳柏霖 published on February 13, 2015
More Recommended Videos
  1. 1. Search word

    Select word on the caption to look it up in the dictionary!

  2. 2. Repeat single sentence

    Repeat the same sentence to enhance listening ability

  3. 3. Shortcut


  4. 4. Close caption

    Close the English caption

  5. 5. Embed

    Embed the video to your blog

  6. 6. Unfold

    Hide right panel

  1. Listening Quiz

    Listening Quiz!

  1. Click to open your notebook

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