MySQL Injection Fast Learning basics

Source: Internet
Author: User

Objective:

SQL injection want to learn, learn to pass. You have to understand the underlying SQL

Statement. I'll get a quick haircut here.

Body:

Set up the environment suggestion Phpsduy Fast Construction

SELECT * from Kasi

Select field name from table name

Querying all fields in a table

Results

Query the specified table name

Select Book name from Kasi

Results

SELECT * from Kasi where ID where in MySQL is a conditional expression

SELECT * from Kasi where condition

Results

Let's get a little more detailed.

SELECT * from Kasi where book name = ' Naruto '

Results

SELECT * from Kasi ORDER BY ID ASC ORDER by in MySQL for sort ASC to ascending desc to descending

SELECT * from Kasi ORDER by ID DESC

SELECT * from Kasi limit 1,3 to output the specified number of rows

Create a new field content

INSERT into Kasi () VALUES (' Stealing stars September days ', ' 5 ', ' 10RMB ', ' China ')

And then insert a bucket of broken skies.

INSERT into Kasi () VALUES (' Bucket break sky ', ' 8 ', ' 30RMB ', ' China ')

Take a look

SELECT * from Kasi

Update Record Updates

UPDATE kasi SET Book name = ' Steal star September days ', id= ' 5 ', price = ' 12RMB ', place of origin = ' China ' where id= ' 5 ' | UPDATE table name SET field name = ' new value ' WHERE clause! Here I understand that by specifying something to update such as ID

View SELECT * from Kasi ORDER by ID ASC

The final deletion

Delete from Kasi where id= ' 5 ' deletes a row of ID5 | Delete from table name where condition deleted | Clear all fields DELETE from Kasi where 1 1 represents table All

Results

Query to see

SELECT * from Kasi

has been removed-end

Well, time has gone by so fast. ~

A Song of small songs:

MySQL Injection Fast Learning basics

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.