Tag: table
What is Hashing and Hash Table?
What is Hashing ? Hashing is a technique used to store elements in such a way that searching over them should be very fast. It internally uses a Hash Table to store the elements. What is Hash Table ? Hash Table is a kind of Data Structure Used to achieve Hashing. It internally maintains a …
Insert into a MySQL table or update if exists
While inserting rows into a table, there are times when the requirement is to insert the rows into a table, but if the key already exists, then update the value. This concept is also known as UPSERT, which is combining UPDATE with INSERT. In this article, we will be looking into : Insert or Update …
MySQL check if table exists
At times there is an essential requirement to find out if a table exists or not in a database, and the same, we will be looking into this article particularly: MySQL check if table exists : SHOW TABLES. MySQL check if table exists : Information Schema. Function to check if the table exists or not …
Every derived table must have its own alias[Solved]
In this article, we will be discussing the below points HOW TO FIX THE ERROR in MySQL : Every derived table must have its own alias Every derived table must have its own alias : JOIN Let’s get started, but first, we will look into the data we will be using in our examples. Assume …
Every derived table must have its own alias[Solved]Read More
MySQL IF EXISTS DROP Table
This article will be looking into how to drop a table if it exists in the database. How to DROP Table IF EXISTS in MySQL How to DROP Temporary Table IF EXISTS in MySQL How to DROP Table IF EXISTS in MySQL What all does a DROP TABLE statement does? DROP TABLE statement will remove one …
Create Temporary Table in MySQL
We can create a temporary table in MySQL using the TEMPORARY keyword. A temporary table is a table that is visible only during the current session and hence has its scope in a single session only. Once the session is closed, access to the temporary table is closed as well. Two different sessions can use …
MySQL- Drop/ Delete column from table
In this article, we will see how to delete a column from a table in MYSQL. Table of Contents MySQL delete column from a table – syntax MySQL delete column from a table – example MySQL drop a column with foreign key Before moving ahead into the tutorial, let us look at the data we …
MySQL: get column names and datatypes of a table
This article will be looking into how to get the column names and their corresponding data types in a MySQL table. Table of Contents Get column names and datatypes – using information schema Get column names and datatypes – using SHOW COLUMNS Let us get started by making the data to be used across the …
MySQL select last record of table
This article will be looking into how to SELECT the last record of a MySQL table. We will be going through a few examples to demonstrate the concept. Table of Contents MySQL select last record of table using LIMIT MySQL select last record of table using MAX() function Let us get started by making the sample data …
SELECT 1 FROM TABLE
Many times we have seen SELECT 1 from a table as subqueries or a query in itself. This article will discuss what select 1 from a table means in MySQL and where it is used. Table of Contents:- MySQL: What is SELECT 1 from a table? Where is SELECT 1 from a table/query used? Let …