Pawandeep Kaur has Published 32 Articles

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

Pawandeep Kaur

Pawandeep Kaur

Updated on 10-Jun-2021 12:49:45

512 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 LEFT join on two tables. The tables can be joined using the LEFT ... Read More

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

Pawandeep Kaur

Pawandeep Kaur

Updated on 10-Jun-2021 12:49:08

3K+ 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 inner join on two tables.JOIN and INNER JOIN both work the same way. ... Read More

How can you avoid getting an error if you are deleting a table which does not exist using Python?

Pawandeep Kaur

Pawandeep Kaur

Updated on 10-Jun-2021 12:46:49

548 Views

There might be a scenario where you might be deleting a table which actually does not exist in your database. It is possible that while executing the command to delete a table from the database, we may give wrong name of the table which doesnot exist in our database. The ... Read More

How can you retrieve a particular number of records from a table starting from some specified row number in Python MySQL?

Pawandeep Kaur

Pawandeep Kaur

Updated on 10-Jun-2021 12:38:52

876 Views

Most frequently, we do not require to select all the rows from the table. We may at times need to retrieve a particular number of records from a table, starting from some specific index. Suppose, we have a table of 10 records. We need to select 5 rows from the ... Read More

How can you update certain values in a table in MySQL using Python?

Pawandeep Kaur

Pawandeep Kaur

Updated on 10-Jun-2021 12:38:34

768 Views

The data in the table may be outdated and we may require to change the data after some time. Suppose, we have a table of Students and one of the students have changed their address. We require to change the address of the student in the database to avoid any ... Read More

How can you delete a table from a database in MySQL Python?

Pawandeep Kaur

Pawandeep Kaur

Updated on 10-Jun-2021 12:38:16

136 Views

It can be at times required to delete the whole table from the database. It is bad use of the storage to keep the unwanted data in the database. Suppose, we have a table named “Employees” in our database and due to some reasons , we do not require this ... Read More

Explain the use of SELECT DISTINCT statement in MySQL using Python?

Pawandeep Kaur

Pawandeep Kaur

Updated on 10-Jun-2021 12:37:56

761 Views

Inside SQL tables, columns usually contain duplicate values. We may sometimes need to get only the distinct or different values present in a column in our table since the duplicate values makes it difficult for us to analyze the results returned by the query.Example:Suppose, we have a table named Customers ... Read More

How can you delete a record from a table using MySQL in Python?

Pawandeep Kaur

Pawandeep Kaur

Updated on 10-Jun-2021 12:37:21

294 Views

We may at times need to delete certain rows from a table. Suppose, we have a table of details of students in the class. It is possible that one of the students left the class and hence, we do not require the details of that particular student. Hence, we need ... Read More

How can you order the result obtained by select query in MySQL?

Pawandeep Kaur

Pawandeep Kaur

Updated on 10-Jun-2021 12:26:46

576 Views

It is common to select certain data or rows from a table. The rows are returned in the order in which they appear in the table. We may sometimes require that the rows we select from the table must be returned to us in ascending or descending order with respect ... Read More

How can you select data from a table based on some criteria using MySQL in Python?

Pawandeep Kaur

Pawandeep Kaur

Updated on 10-Jun-2021 12:18:26

550 Views

It is not frequently required to select all the data from the table. Instead , we need to select data or rows from the table based on some condition or criteria.Suppose, we have a table which includes names and marks of many students. Now, we need to get names of ... Read More

Advertisements