What are DDL, DML, and DCL?

Majorly SQL commands can be divided into three categories, i.e., DDL, DML & DCL. Data Definition Language (DDL) deals with all the database schemas, and it defines how the data should reside in the database. Commands like CreateTABLE and ALTER TABLE are part of DDL. Data Manipulative Language (DML) deals with operations and manipulations on … Read more

What are the drivers in MySQL?

Following are the drivers available in MySQL: PHP Driver JDBC Driver ODBC Driver C WRAPPER PYTHON Driver PERL Driver RUBY Driver CAP11PHP Driver Ado.net5.mxz In MySQL, there are several drivers available for connecting to the database from different programming languages. The correct answer depends on the context of the question. Generally, the main drivers used … Read more

What is the difference between primary key and candidate key?

To identify each row of a table, we will use a primary key. For a table, there exists only one primary key. A candidate key is a column or a set of columns, which can be used to uniquely identify any record in the database without having to reference any other data. In MySQL, as … Read more

What are federated tables?

Federated tables are tables that point to the tables located on other databases on some other server. Federated tables in MySQL allow you to access data from a remote MySQL database as if it were a local table. This feature enables you to integrate data from multiple databases across different servers seamlessly. By using federated … Read more

How can we run batch mode in MySQL?

To perform batch mode in MySQL, we use the following command: mysql; mysql mysql.out; To run MySQL in batch mode, you can use the command-line tool and pass SQL statements from a file rather than typing them interactively. This is particularly useful for executing a series of SQL commands or scripts. You can run MySQL … Read more