0% found this document useful (0 votes)
5 views1 page

Tutor Mysql Part 3 Gop

The document provides instructions on basic MySQL operations including inserting, updating, deleting, and selecting rows in a table. It specifies the syntax for using single and double quotes for string values, and demonstrates example queries along with their expected return values. Additionally, it highlights the requirement for enclosing strings and dates in quotes while integers can be used without quotes.

Uploaded by

Irfan Pordjo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views1 page

Tutor Mysql Part 3 Gop

The document provides instructions on basic MySQL operations including inserting, updating, deleting, and selecting rows in a table. It specifies the syntax for using single and double quotes for string values, and demonstrates example queries along with their expected return values. Additionally, it highlights the requirement for enclosing strings and dates in quotes while integers can be used without quotes.

Uploaded by

Irfan Pordjo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

VALUES ( "myuser", "myuser@example.

com" );

Example return value:

Query OK, 1 row affected (0.06 sec)

The varchar a.k.a strings can be also be inserted using single quotes:

INSERT INTO mytable ( username, email )


VALUES ( 'username', '[email protected]' );

Updating a row into a MySQL table

UPDATE mytable SET username="myuser" WHERE id=8

Example return value:

Query OK, 1 row affected (0.06 sec)

The int value can be inserted in a query without quotes. Strings and Dates must be enclosed in
single quote ' or double quotes ".

Deleting a row into a MySQL table

DELETE FROM mytable WHERE id=8

Example return value:

Query OK, 1 row affected (0.06 sec)

This will delete the row having id is 8.

Selecting rows based on conditions in MySQL

SELECT * FROM mytable WHERE username = "myuser";

Return value:

+----+----------+---------------------+
| id | username | email |
+----+----------+---------------------+
| 1 | myuser | [email protected] |
+----+----------+---------------------+

1 row in set (0.00 sec)

https://riptutorial.com/ 4

You might also like