Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
MySQLi Articles
Page 16 of 341
What are the features that were removed in MySQL 8.0?
Some of the features have become obsolete and have been removed from MySQL 8.0. When alternatives to these removed items are shown, they need to be used to avoid further complications.The ‘innodb_locks_unsafe_for_binlog’ system variable has been removed.The ‘READ COMMITTED’ isolation level can be used since it behaves in a similar way.After upgrading the system to MySQL version 8.0.3 or later, scripts that reference previous InnoDB INFORMATION_SCHEMA view names have to be upgraded.Some of the account management attributes have been removed. A few have been listed below:Instead of using ‘GRANT’ to create users, use ‘CREATE USER’.The query cache has been removed.The deprecated ...
Read MoreWhat are the options and variables introduced in MySQL 8.0?
Some of the options and variables newly introduced in MySQL 8.0 have been listed below:Com_clone: It refers to the number of CLONE statements. It was added in MySQL 8.0.2.Com_create_role: It refers to the number of CREATE ROLE statements that are used. It was added in MySQL 8.0.0.Com_drop_role: It refers to the number of DROP ROLE statements that were used. It was added in MySQL 8.0.0.Com_restart: It refers to the number of RESTART statements that were used. It was added in MySQL 8.0.4.Firewall_access_denied: It refers to the number of statements that were rejected by MySQL Enterprise Firewall. It was added in ...
Read MoreHow to Report MySQL Bugs or Problems
What is a bug?A bug is something that results in the program stalling or halting abruptly. This results in anomalies and causes complications, resulting in the task not getting complete. MySQL helps resolve these bugs, once they are reported.Some bugs have fixes since they would have been previously reported, and fixes would have been provided.Pre-requisitesBefore posting a bug report, it is important to verify that the bug hasn’t been reported already. For this purpose, look for the problem in the MySQL manual at https://dev.mysql.com/doc/. The manual is always updated with solutions to newly found issues.If there is a parsing error ...
Read MoreSet user-defined variable with table name in MySQL prepare statement?
Let us first create a table −mysql> create table DemoTable ( StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY, StudentName varchar(20) ); Query OK, 0 rows affected (0.71 sec)Insert some records in the table using insert command −mysql> insert into DemoTable(StudentName) values('Chris'); Query OK, 1 row affected (0.21 sec) mysql> insert into DemoTable(StudentName) values('David'); Query OK, 1 row affected (0.06 sec) mysql> insert into DemoTable(StudentName) values('Sam'); Query OK, 1 row affected (0.13 sec) mysql> insert into DemoTable(StudentName) values('Mike'); Query OK, 1 row affected (0.12 sec)Display all records from the table using select statement −mysql> select * from DemoTable;This will ...
Read MoreCondition to check for due date and current date records in MySQL where clause
To check for such conditions, use IF() in MySQL.Let us create a table −Examplemysql> create table demo89 -> ( -> duedate date -> ); Query OK, 0 rows affected (0.78Insert some records into the table with the help of insert command −Examplemysql> insert into demo89 values('2020-01-10'); Query OK, 1 row affected (0.55 mysql> insert into demo89 values(null); Query OK, 1 row affected (0.13 mysql> insert into demo89 values('2020-11-29'); Query OK, 1 row affected (0.15 mysql> insert into demo89 values('2019-11-29'); Query OK, 1 row affected (0.09Display records from the table using select statement −Examplemysql> select ...
Read MoreCreating a table with MySQL - Hibernate
To create a table, you need to insert below line into application.properties −spring.jpa.hibernate.ddl-auto=updateHere, Hibernate will create the table demo88 automatically. The application.properties code is as follows −spring.datasource.platform=mysql spring.jpa.database-platform=org.hibernate.dialect.MySQL5InnoDBDialect spring.jpa.hibernate.ddl-auto=update server.port=8191 spring.datasource.driverClassName=com.mysql.jdbc.Driver spring.datasource.url=jdbc:mysql://localhost:3306/sampledatabase spring.datasource.username=root spring.datasource.password=123456The demo88 entity class is as follows to create table columns −Examplepackage com.automaticallytablecreation; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; @Entity @Table public class demo88 { @Id private int id; @Column(name="name") private String name; }The main class code is as follows −Examplepackage com.automaticallytablecreation; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class AutomaticTableApplication { public static void main(String[] ...
Read MoreHow to check if any value is Null in a MySQL table single row?
For this, you can use ISNULL in MySQL.Let us create a table −Examplemysql> create table demo86 -> ( -> value1 varchar(20) -> , -> value2 varchar(20) -> ); Query OK, 0 rows affected (2.77Insert some records into the table with the help of insert command −Examplemysql> insert into demo86 values(null, null); Query OK, 1 row affected (0.34 mysql> insert into demo86 values(null, 'John'); Query OK, 1 row affected (0.16 mysql> insert into demo86 values('David', 'Mike'); Query OK, 1 row affected (0.17 mysql> insert into demo86 values('Sam', null); Query OK, 1 row affected ...
Read MoreMySQL - SUM rows with same ID?
To sum rows with same ID, use the GROUP BY HAVING clause.Let us create a table −Examplemysql> create table demo84 -> ( -> id int, -> price int -> ) -> ; Query OK, 0 rows affected (0.60Insert some records into the table with the help of insert command −Examplemysql> insert into demo84 values(1, 2000); Query OK, 1 row affected (0.08 mysql> insert into demo84 values(1, 2000); Query OK, 1 row affected (0.14 mysql> insert into demo84 values(2, 1800); Query OK, 1 row affected (0.14 mysql> insert into demo84 values(2, 2200); Query ...
Read MoreShow date like 30-04-2020 instead of 2020-04-30 from MySQL database?
For this, use DATE_FORMAT() in MySQL. The syntax is as follows −Exampleselect date_format(yourColumnName, '%d-%m-%Y') as anyAliasName from yourTableName;Let us create a table −Examplemysql> create table demo80 -> ( -> due_date date -> ); Query OK, 0 rows affected (0.74Insert some records into the table with the help of insert command −Examplemysql> insert into demo80 values('2020-04-30'); Query OK, 1 row affected (0.14 mysql> insert into demo80 values('2016-01-10'); Query OK, 1 row affected (0.17 mysql> insert into demo80 values('2018-03-21'); Query OK, 1 row affected (0.12Display records from the table using select statement −Examplemysql> select *from demo80;This will ...
Read MoreHow to get username using ID from another table in MySQL database?
To get username using ID from two tables, you need to use JOIN and join the tables.Let us create a table −Examplemysql> create table demo77 -> ( -> userid int not null primary key, -> username varchar(20) -> ); Query OK, 0 rows affected (2.63Insert some records into the table with the help of insert command −Examplemysql> insert into demo77 values(1, 'John'); Query OK, 1 row affected (0.19 mysql> insert into demo77 values(2, 'Bob'); Query OK, 1 row affected (0.36Display records from the table using select statement −Examplemysql> select *from demo77;This will produce the following ...
Read More