Chandu yadav has Published 1226 Articles

How to get the count of each distinct value in a column in MySQL?

Chandu yadav

Chandu yadav

Updated on 30-Jul-2019 22:30:23

4K+ Views

Let us see an example to get the count of each distinct value in a column. Firstly, we will create a table. The CREATE command is used to create a table. mysql> create table DistinctDemo1 - > ( - > id int, ... Read More

Compilation and Execution of a C# Program

Chandu yadav

Chandu yadav

Updated on 30-Jul-2019 22:30:23

18K+ Views

To compile and execute a program in C#, you just need to click the Run button or press F5 key to execute the project in Microsoft Visual Studio IDE. Compile a C# program by using the command-line instead of the Microsoft Visual Studio IDE − Open a text editor ... Read More

How do I remove a MySQL database?

Chandu yadav

Chandu yadav

Updated on 30-Jul-2019 22:30:23

245 Views

To remove any database, we need to use DROP command in MySQL. Here is the syntax. DROP DATABASE yourDatabaseName; First, let us check how many databases are present in MySQL. Here is the query for the same. mysql> SHOW DATABASES; The following is the output. ... Read More

Using DISTINCT and COUNT together in a MySQL Query?

Chandu yadav

Chandu yadav

Updated on 30-Jul-2019 22:30:23

362 Views

We can use DISTINCT and COUNT together in a single MySQL query. Firstly, let us create a table. The CREATE command is used to create a table. mysql> create table DistCountDemo - > ( - > id int, - > ... Read More

Cable Modems

Chandu yadav

Chandu yadav

Updated on 30-Jul-2019 22:30:23

3K+ Views

Cable modem is a hardware device that is used to connect the computer with the Internet Service Provider (ISP) through the local cable TV line. It has two interfaces – one to the cable TV network outlet and the other to a computer or television or set-top box. Configuration Cable ... Read More

Alter a MySQL column to be AUTO_INCREMENT?

Chandu yadav

Chandu yadav

Updated on 30-Jul-2019 22:30:23

1K+ Views

Let’s say we have a table and now there is a requirement to add AUTO_INCREMENT on column name. For that, use the MODIFY command. Here, we will create a demo table first. mysql> create table AddingAutoIncrement -> ( -> Id int, ... Read More

When to use MyISAM and InnoDB?

Chandu yadav

Chandu yadav

Updated on 30-Jul-2019 22:30:23

539 Views

InnoDB is a general-purpose storage engine that balances high reliability and performance. Since MySQL 5.6, InnoDB is the default MySQL storage engine. InnoDB can be used for various purposes. Here are some of them − It can be used for transaction purpose i.e. all ACID properties. InnoDB can be ... Read More

How can I return 0 for NULL in MySQL?

Chandu yadav

Chandu yadav

Updated on 30-Jul-2019 22:30:23

15K+ Views

We can return 0 for NULL in MySQL with the help of IFNULL() method. The syntax of IFNULL() is as follows. IFNULL(YOUREXPRESSION, 0); Let us see an example. First, we will create a table. mysql> create table NullDemoWithZero -> ( -> ... Read More

Python program to reverse an array in groups of given size?

Chandu yadav

Chandu yadav

Updated on 30-Jul-2019 22:30:23

494 Views

Here we use one user input array and the size of the group. And we create sub array on the size of the group and we just reverse it. If the size of the groups(p) is not multiple of the size of the array(n) then the last group will less ... Read More

What is the benefit of zerofill in MySQL?

Chandu yadav

Chandu yadav

Updated on 30-Jul-2019 22:30:23

2K+ Views

ZEROFILL pads the displayed value of the field with zeros up to the display width set in the column definition. Let us understand the role of zero fill in MySQL using an example. Creating a table with two columns, one has zerofill and the second one does not. The query ... Read More

Advertisements