Foreword:
I want to learn SQL injection well and learn it well. Must understand basic SQL
statement. Here I will make a quick rationale
text:
It is recommended to build the environment quickly under phpsduy
select * from kasi
select field name from table name
Query all fields in a table
result
Query the specified table name
select book title from kasi
result
select * from kasi where id where is a conditional expression in mysql
select * from kasi where 条件
result
come in more detail
select * from kasi where book name='Naruto'
result
select * from kasi order by id ASC order by is used in mysql to sort ASC as ascending DESC as descending
select * from kasi order by id DESC
select * from kasi limit 1,3 is used to output the specified number of rows
Create new field content
INSERT INTO kasi() VALUES('Stealing stars in September','5','10RMB','China')
Then insert a fight to break the sky
INSERT INTO kasi() VALUES('Breaking the Sky','8','30RMB','China')
Check it out
select * from kasi
Update record UPDATE
UPDATE kasi SET Book Name='Stealing Stars in September', id='5', Price='12RMB', 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
Viewselect * from kasi order by id ASC
final delete
DELETE FROM kasi where id='5' delete a row of id5 | DELETE FROM table name where condition delete | clear all fields DELETE FROM kasi where 1 1 represents all the table
result
query to see
select * from kasi
has been removed -END
Well, time flies so fast. ~
A little song: