Chandu yadav has Published 1091 Articles

MySQL error 1452 - Cannot add or update a child row: a foreign key constraint fails?

Chandu yadav

Chandu yadav

Updated on 14-Sep-2023 13:45:42

34K+ Views

This error comes whenever we add a foreign key constraint between tables and insert records into the child table. Let us see an example. Creating the child table. mysql> create table ChildDemo -> ( -> id int, -> FKPK int ... Read More

How to Convert Binary to Decimal?

Chandu yadav

Chandu yadav

Updated on 14-Sep-2023 13:12:25

25K+ Views

Binary is the simplest kind of number system that uses only two digits of 0 and 1 (i.e. value of base 2). Since digital electronics have only these two states (either 0 or 1), so binary number is most preferred in modern computer engineer, networking and communication specialists, and other ... Read More

Elementary Data Link Protocols

Chandu yadav

Chandu yadav

Updated on 13-Sep-2023 15:56:09

68K+ Views

Protocols in the data link layer are designed so that this layer can perform its basic functions: framing, error control and flow control. Framing is the process of dividing bit - streams from physical layer into data frames whose size ranges from a few hundred to a few thousand bytes. ... Read More

How to select last 10 rows from MySQL?

Chandu yadav

Chandu yadav

Updated on 12-Sep-2023 01:58:16

38K+ Views

To select last 10 rows from MySQL, we can use a subquery with SELECT statement and Limit concept. The following is an example. Creating a table. mysql> create table Last10RecordsDemo -> ( -> id int, -> name varchar(100) ... Read More

How to select first 10 elements from a MySQL database?

Chandu yadav

Chandu yadav

Updated on 06-Sep-2023 11:53:08

50K+ Views

To select first 10 elements from a database using SQL ORDER BY clause with LIMIT 10.The syntax is as followsSELECT *FROM yourTableName ORDER BY yourIdColumnName LIMIT 10;To understand the above syntax, let us create a table. The query to create a table is as followsmysql> create table Clients    - ... Read More

MySQL - Insert current date/time?

Chandu yadav

Chandu yadav

Updated on 02-Sep-2023 15:55:56

55K+ Views

To insert only date value, use curdate() in MySQL. With that, if you want to get the entire datetime, then you can use now() method.Let us first create a table −mysql> create table CurDateDemo -> ( -> ArrivalDate datetime -> ); ... Read More

How to select last row in MySQL?

Chandu yadav

Chandu yadav

Updated on 02-Sep-2023 12:47:00

60K+ Views

To select the last row, we can use ORDER BY clause with desc (descending) property and Limit 1. Let us first create a table and insert some records with the help of INSERT command. The query is as follows. mysql> create table getLastRecord -> ( ... Read More

How to improve the ranking of your websites for search engines

Chandu yadav

Chandu yadav

Updated on 01-Jun-2022 07:11:46

268 Views

Let’s assume that, you want to promote your dance academy. As the owner of the institution, you want more people to know about the types of dance forms being taught in your institute and the other facilities you are providing. The more people know about your academy, the more students ... Read More

Why does one need a mentor in life to grow?

Chandu yadav

Chandu yadav

Updated on 26-Apr-2022 06:41:14

170 Views

Either you want a growth in the current role or kick off a new business, a good mentor can pave the way for you. At your workplace, you might find many individuals who hold a treasure of leadership experiences and people just fall for their intelligence. You can make such ... Read More

Create Three Equal Columns with Bootstrap grid Layout

Chandu yadav

Chandu yadav

Updated on 09-Feb-2022 07:23:05

1K+ Views

To create three equal columns layout with Bootstrap Grid Layout, you can try to run the following code −Example           Bootstrap Example                              Bootstrap Grid                       Column One             Column Two             Column Three                     Output

Advertisements