Browsed by
Category: Blog

How to install MySQL?

How to install MySQL?

Installing MySQL on our system allows us to safely create, drop, and test web applications without affecting our live website’s data. There are many ways to use MySQL on our system, but the best way is to install it manually. The manual installation allows us to learn more about the system and provides more control over the database. To see the installation steps of MySQL in Windows goes to the below link: https://www.javatpoint.com/how-to-install-mysql Manual installation of MySQL has several benefits:…

Read More Read More

How to create a Stored Procedure in MySQL?

How to create a Stored Procedure in MySQL?

A stored procedure is a group of SQL statements that we save in the database. The SQL queries, including INSERT, UPDATE, DELETE, etc. can be a part of the stored procedure. A procedure allows us to use the same code over and over again by executing a single statement. It stores in the database data dictionary. We can create a stored procedure using the below syntax: CREATE PROCEDURE procedure_name [ (parameter datatype [, parameter datatype]) ] BEGIN Body_section of SQL…

Read More Read More

What is the heap table?

What is the heap table?

Tables that are present in memory is known as HEAP tables. When you create a heap table in MySQL, you should need to specify the TYPE as HEAP. These tables are commonly known as memory tables. They are used for high-speed storage on a temporary basis. They do not allow BLOB or TEXT fields. In MySQL, a “heap table” is another term for an in-memory table or a temporary table. It’s a table type that’s stored in memory rather than…

Read More Read More

What is REGEXP?

What is REGEXP?

REGEXP is a pattern match using a regular expression. The regular expression is a powerful way of specifying a pattern for a sophisticated search. Basically, it is a special text string for describing a search pattern. To understand it better, you can think of a situation of daily life when you search for .txt files to list all text files in the file manager. The regex equivalent for .txt will be .*\.txt.

What are the differences between MySQL_fetch_array(), MySQL_fetch_object(), MySQL_fetch_row()?

What are the differences between MySQL_fetch_array(), MySQL_fetch_object(), MySQL_fetch_row()?

Mysql_fetch_object is used to retrieve the result from the database as objects, while mysql_fetch_array returns result as an array. This will allow access to the data by the field names. For example: Using mysql_fetch_object field can be accessed as $result->name. Using mysql_fetch_array field can be accessed as $result->[name]. Using mysql_fetch_row($result) where $result is the result resource returned from a successful query executed using the mysql_query() function. Example: $result = mysql_query(“SELECT * from students”); while($row = mysql_fetch_row($result)) { Some statement; }

Corporate Assessment Test for Interview Screening

Corporate Assessment Test for Interview Screening

If you are looking for Corporate Assessment Test for Interview Screening the Candidates who applied for job vacancies, you are at right place. We are offering Corporate Assessment Test for Interview Screening. Contact us in chat box, we will call you back.

MySQL Interview Questions – Set 13

MySQL Interview Questions – Set 13

How to join three tables in MySQL? Sometimes we need to fetch data from three or more tables. There are two types available to do these types of joins. Suppose we have three tables named Student, Marks, and Details. Let’s say Student has (stud_id, name) columns, Marks has (school_id, stud_id, scores) columns, and Details has (school_id, address, email) columns. 1. Using SQL Join Clause This approach is similar to the way we join two tables. The following query returns result…

Read More Read More

How to add columns in MySQL?

How to add columns in MySQL?

A column is a series of cells in a table that stores one value for each row in a table. We can add columns in an existing table using the ALTER TABLE statement as follows: ALTER TABLE table_name ADD COLUMN column_name column_definition [FIRST|AFTER existing_column]; To add columns to an existing table in MySQL, you can use the ALTER TABLE statement. Here’s the basic syntax: ALTER TABLE table_name ADD column_name column_definition; Replace table_name with the name of the table to which…

Read More Read More

How to execute a stored procedure in MySQL?

How to execute a stored procedure in MySQL?

We can execute a stored procedure in MySQL by simply CALL query. This query takes the name of the stored procedure and any parameters we need to pass to it. The following is the basic syntax to execute a stored procedure: CALL stored_procedure_name (argument_list); Let’s understand it with this example: CALL Product_Pricing (@pricelow, @pricehigh); Here, a stored procedure named Product_Pricing calculates and returns the lowest and highest product prices.

What is BLOB and TEXT in MySQL?

What is BLOB and TEXT in MySQL?

BLOB is an acronym that stands for a large binary object. It is used to hold a variable amount of data. There are four types of the BLOB. TINYBLOB BLOB MEDIUMBLOB LONGBLOB The differences among all these are the maximum length of values they can hold. TEXT is a case-insensitive BLOB. TEXT values are non-binary strings (character string). They have a character set, and values are stored and compared based on the collation of the character set. There are four…

Read More Read More