MySQL Server Invisible Columns Tutorial | MySQL 8.0.23



MySQL Server Invisible Columns Tutorial | MySQL 8.0.23

MySQL Server Invisible Columns Tutorial | MySQL 8.0.23

In this mysql tutorial, we’ll tell you about a feature within MySQL server – starting from MySQL Server 8.0.23, MySQL installation supports invisible columns. Such SQL columns are usually hidden to SQL queries, but they can be accessed if explicitly defined.

To specify the visibility of a column in your MySQL Server, use the “VISIBLE” or “INVISIBLE” keywords when defining them like so:

CREATE TABLE `demo` (
`column_1` VARCHAR(255) NOT NULL DEFAULT ”,
`column_2` VARCHAR(120) NOT NULL DEFAULT ” INVISIBLE,

);

Keep in mind that your SQL table has to have at least one visible SQL column at all times.

After that, keep in mind that when you run SQL queries like SELECT *, your invisible sql column will be invisible, but if you explicitly run a sql select query on the column in question, you will be able to see the data.

In other words, SQL queries like this will not show any data from “column_2”:
SELECT * FROM `demo`;

While SQL queries like this will return data:
SELECT `column_2` FROM `demo`;

Have you enjoyed this nosql tutorial for beginners? Let us know if we should make another sql tutorial just for you! It can be a sql tutorial for beginners or anything else.

Also explore our channel to know how to solve the mysql shutdown unexpectedly error, to learn how a mysql database works by watching a mysql tutorial, to know the differences between mysql vs postgresql, and so on.

Music:
React by LiQWYD https://soundcloud.com/liqwyd
Creative Commons — Attribution 3.0 Unported — CC BY 3.0
Free Download / Stream: https://bit.ly/3Duj3eX
Music promoted by Audio Library: https://www.youtube.com/watch?v=sH_MzggvN2g

#mysql #database #web #webdevelopment #developer #sql #webdeveloper