Found 4219 Articles for MySQLi

What are the features that are added in MySQL 8.0?

AmitDiwan
Updated on 24-Feb-2021 12:43:40

185 Views

Let us understand the features that were added to MySQL 8.0Security Levels EnhancedThe security levels have been improved, and DBA (Database administrator) has been given greater flexibility for account management.Resource GroupsResource groups can be created and managed, and the server has the ability to assign threads to resources of specific groups, that are running within the server. Group attributes can be used to control the resources, restrict or provide permission to the threads to consume the resource, and so on.Transactional Data DictionaryA transactional data dictionary is used to store information about objects, which was previously a non-transactional table.Upgrade ProcedureThe upgrade ... Read More

What are the new features in MySQL 8.0

AmitDiwan
Updated on 24-Feb-2021 13:41:41

665 Views

MySQL is a very powerful program in its own right. It handles a large subset of the functionality of the most expensive and powerful database packages. It uses a standard form of the well-known SQL data language. MySQL 8.0 released on 19 April 2018 and the current version is 8.0.23.The new features in MySQL 8.0 have been briefly listed below:Atomic DDLAn atomic data definition language (DDL) statement to combine updates made to data dictionary, storage engine operations and so on.Encryption DefaultsThe encryption defaults have been defined and implemented globally for table encryption.  The ‘default_table_encryption’ variable is used to define an ... Read More

Discuss the history of MySQL

AmitDiwan
Updated on 24-Feb-2021 11:19:38

2K+ Views

MySQL is an open source SQL (structured query language) database management system.  It is a system that helps store and manage data efficiently. Database generally stores data in a structured fashion.Timeline of MySQLUnireg, which is the code base of MySQL, was started in 1981.MySQL was founded in 1995 in Sweden.In 2000, MySQL went open source, so it could be accessed and used by all.In the year 2001, Marten Mickos was elected as the CEO of MySQL.In the year 2002, MySQL launched its headquarters in USA, in addition to Sweden headquarters.In 2003, MySQL entered into a partnership with SAP, and many features ... Read More

Discuss few characteristics of MySQL

AmitDiwan
Updated on 24-Feb-2021 11:09:55

533 Views

MySQL is an open source SQL (structured query language) database management system. Let us see some of its characteristics:ConsistentMySQL server is quick, and reliable. It stores data efficiently in the memory ensuring that data is consistent, and not redundant.ScalableMySQL server is scalable and easy to use. Scalability refers to the ability of systems to work easily with small amounts of data, large amounts of data, clusters of machines, and so on.  It is also used in production environment due to its scalability and ease of use.Databases over InternetIt provides high security, improved connectivity, and speed thereby making it suitable to ... Read More

Condition to check for due date and current date records in MySQL where clause

AmitDiwan
Updated on 11-Dec-2020 05:57:50

543 Views

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 More

Creating a table with MySQL - Hibernate

AmitDiwan
Updated on 11-Dec-2020 05:55:53

2K+ Views

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 More

Display MySQL table values using Java

AmitDiwan
Updated on 11-Dec-2020 05:50:52

4K+ Views

For this, you can use the ResultSet concept. For connection, we will be using the MySQL JDBC Driver.Let us create a table −Examplemysql> create table demo87    -> (    -> name varchar(20),    -> age int    -> )    -> ; Query OK, 0 rows affected (0.62Insert some records into the table with the help of insert command −Examplemysql> insert into demo87 values('John', 21); Query OK, 1 row affected (0.15 mysql> insert into demo87 values('David', 23); Query OK, 1 row affected (0.12 mysql> insert into demo87 values('Bob', 22); Query OK, 1 row affected (0.16Display records from ... Read More

How to check if any value is Null in a MySQL table single row?

AmitDiwan
Updated on 11-Dec-2020 05:47:37

478 Views

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 More

MySQL - SUM rows with same ID?

AmitDiwan
Updated on 11-Dec-2020 05:44:45

8K+ Views

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 More

MySQL query for INSERT INTO using values from another table?

AmitDiwan
Updated on 11-Dec-2020 05:42:20

793 Views

For this, use INSERT INTO SELECT statement.Let us create a table −Examplemysql> create table demo82    -> (    -> id int,    -> name varchar(20)    -> ); Query OK, 0 rows affected (2.06Insert some records into the table with the help of insert command −Examplemysql> insert into demo82 values(100, 'John'); Query OK, 1 row affected (0.14 mysql> insert into demo82 values(101, 'Bob'); Query OK, 1 row affected (0.32 mysql> insert into demo82 values(101, 'David'); Query OK, 1 row affected (0.09 mysql> insert into demo82 values(101, 'Mike'); Query OK, 1 row affected (0.12 mysql> insert ... Read More

Advertisements