Chandu yadav

Chandu yadav

810 Articles Published

Articles by Chandu yadav

Page 80 of 81

How to do a batch insert in MySQL?

Chandu yadav
Chandu yadav
Updated on 30-Jul-2019 3K+ Views

To do a batch insert, we need to use all column names with parenthesis, separated by ‘, ’. Let us see an example. First, we will create a table. The following is the CREATE command to create a table. mysql> CREATE table MultipleRecordWithValues - > ( - > id int, - > name varchar(100) - > ); Query OK, 0 rows affected (0.88 sec) The following is the syntax of batch insert. INSERT into yourTableName values(column1, column2, ....N), (column1, column2, ....N), (column1, column2, ....N), ...........N; ...

Read More

Open MySQL root access from all hosts?

Chandu yadav
Chandu yadav
Updated on 30-Jul-2019 989 Views

To open root access from all hosts, we need to change the database to “mysql” with the help of USE command. The syntax of USE command is as follows − USE anyDatabasename; Now, I will use predefined database ‘mysql’, which is as follows − mysql> use mysql; Database changed I have changed the database above. Here is the query to get root access from the entire host − mysql> UPDATE user set host='%' where host='localhost'; Query OK, 6 rows affected (0.19 sec) Rows matched: 6 Changed: 6 Warnings: 0

Read More

Voice over LTE (VoLTE)

Chandu yadav
Chandu yadav
Updated on 30-Jul-2019 2K+ Views

Voice over long-term evolution or Voice-over LTE (VoLTE) are the standards in all-IP networks for voice communication as well as data communication over 4G LTE networks. VoLTE offers services like creating, provisioning and managing high-speed voice, data, multimedia and messaging services on a 4G wireless network for mobile and portable devices. It uses the IP multimedia subsystem (IMS) to deliver the services. It transmits everything through only packets and thus supports only packet switching. So, all data from any circuit-switched networks like GSM need to be converted to packets before they are transmitted by VoLTE. The communication is depicted ...

Read More

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

Chandu yadav
Chandu yadav
Updated on 30-Jul-2019 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, - > name varchar(100) - > ); Query OK, 0 rows affected (0.43 sec) Inserting records mysql> insert into DistinctDemo1 values(1, 'John'); Query OK, 1 row affected (0.34 sec) mysql> insert into DistinctDemo1 values(2, 'John'); Query OK, 1 row affected (0.20 sec) ...

Read More

Using DISTINCT and COUNT together in a MySQL Query?

Chandu yadav
Chandu yadav
Updated on 30-Jul-2019 513 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, - > name varchar(100), - > age int - > ); Query OK, 0 rows affected (0.48 sec) Records are inserted with the help of INSERT command. mysql> insert into DistCountDemo values(1, 'John', 23); Query OK, 1 row affected (0.11 sec) mysql> insert ...

Read More

Cable Modems

Chandu yadav
Chandu yadav
Updated on 30-Jul-2019 5K+ 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 modems used to be proprietary in the initial days and had to be installed by the cable company. Nowadays, cable modems of open standards are available that can be personally installed by the user. The standard is called Data Over Cable Service Interface Spectrum (DOSCIS). The modem to computer interface ...

Read More

Alter a MySQL column to be AUTO_INCREMENT?

Chandu yadav
Chandu yadav
Updated on 30-Jul-2019 3K+ 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, -> Name varchar(200), -> Primary key(Id) -> ); Query OK, 0 rows affected (0.47 sec) We have created a table above and now let us alter the table to add AUTO_INCREMENT on column name ‘Id’. The syntax is as follows − ...

Read More

When to use MyISAM and InnoDB?

Chandu yadav
Chandu yadav
Updated on 30-Jul-2019 736 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 used for row level locking, that means it gives higher performance as compared to MyISAM. InnoDB can be used for both data and index for a large buffer pool. InnoDB can be used when we need better performance than MyISAM. MyISAM is the default storage engine for the MySQL ...

Read More

How can I return 0 for NULL in MySQL?

Chandu yadav
Chandu yadav
Updated on 30-Jul-2019 19K+ 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 -> ( -> id varchar(200) -> ); Query OK, 0 rows affected (0.65 sec) After creating a table, let us insert some records in the table using the INSERT command. The query is as follows − mysql> insert into NullDemoWithZero values(); Query OK, 1 row affected (0.16 sec) ...

Read More

What is the benefit of zerofill in MySQL?

Chandu yadav
Chandu yadav
Updated on 30-Jul-2019 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 to create a table. mysql> create table ZeroFillDemo -> ( -> First int(18) zerofill, -> Second int(18) -> ); Query OK, 0 rows affected (0.63 sec) We can insert records in the table with the help ...

Read More
Showing 791–800 of 810 articles
Advertisements