Pawandeep Kaur has Published 32 Articles

How to get the id after INSERT into MySQL database using Python?

Pawandeep Kaur

Pawandeep Kaur

Updated on 10-Jun-2021 13:17:38

8K+ Views

The data is inserted into the table in Mysql using the INSERT statement. While inserting the data into the table, either the data must be provided in the same order as the column definition in the database or the column names must be provided along with the data while using ... Read More

Explain the use of COUNT() AND SUM() in MySQL using Python?

Pawandeep Kaur

Pawandeep Kaur

Updated on 10-Jun-2021 13:17:20

3K+ Views

These are the functions used to perform the arithmetic operations on the column values in a table.The COUNT() function is used to return the number of rows which satisfy a certain condition.The SUM() function is used to return the sum of numerical values in a column in the table.The NULL ... Read More

How to copy a table in MySQL using Python?

Pawandeep Kaur

Pawandeep Kaur

Updated on 10-Jun-2021 13:17:01

3K+ Views

We can create copy of an existing table in mysql using Python. The entire table will be copied including the columns, the column definitions and all the rows of the table.SyntaxCREATE TABLE table_name SELECT * FROM existing_tabletable_name is the name of the new table to be created. existing_table is the ... Read More

What is the rollback() method in Python MySQL?

Pawandeep Kaur

Pawandeep Kaur

Updated on 10-Jun-2021 13:04:09

3K+ Views

The rollback() method is one among the various methods in Python which is used to make the database transactions.Here, we will discuss about the rollback() method.The rollback() method is used to revert the last change or commit made to the database. If a condition arises such that the user is ... Read More

What is Python commit() method in MySQL?

Pawandeep Kaur

Pawandeep Kaur

Updated on 10-Jun-2021 13:03:41

17K+ Views

The commit() method is one among the various methods in Python which is used to make the database transactions.Here, we will discuss about the commit() method. The commit() method is used to confirm the changes made by the user to the database. Whenever any change is made to the database ... Read More

Explain the use of sql LIKE operator using MySQL in Python?

Pawandeep Kaur

Pawandeep Kaur

Updated on 10-Jun-2021 13:03:23

4K+ Views

LIKE is a operator in MySQL. The LIKE operator is used with the WHERE statement to search for a specific pattern in the table.Suppose you want to search for values which start with “a” in the table, the LIKE statement is used in such scenarios.There are two wildcard characters used ... Read More

Explain the use of MIN() and MAX() using MySQL in Python?

Pawandeep Kaur

Pawandeep Kaur

Updated on 10-Jun-2021 12:58:36

832 Views

The MIN() and MAX() functions are used to perform arithmetic operations on the columns of the table.As the name suggests, the MIN() function is used to select and return the samllest value from the selected column.The MAX() function, on the other hand, selects and returns the highest value from the ... Read More

How can you perform self join on two tables using MySQL in Python?

Pawandeep Kaur

Pawandeep Kaur

Updated on 10-Jun-2021 12:58:13

232 Views

We can join two tables in SQL based on a common column between them or based on some specified condition. There are different types of JOIN available to join two SQL tables.Here, we will discuss about the SELF join on two tables.As the name signifies, SELF join is the join ... Read More

How can you perform full join on two tables using MySQL in Python?

Pawandeep Kaur

Pawandeep Kaur

Updated on 10-Jun-2021 12:53:59

233 Views

We can join two tables in SQL based on a common column between them or based on some specified condition. There are different types of JOIN available to join two SQL tables.Here, we will discuss about the FULL join on two tables. In the FULL JOIN, all the records from ... Read More

How can you perform right join on two tables using MySQL in Python?

Pawandeep Kaur

Pawandeep Kaur

Updated on 10-Jun-2021 12:51:42

164 Views

We can join two tables in SQL based on a common column between them or based on some specified condition. There are different types of JOIN available to join two SQL tables.Here, we will discuss about the RIGHT join on two tables.In the RIGHT JOIN, all the records from the ... Read More

Advertisements