Skip to main content

Posts

World Nomads Logo

How to drop VIEW in MySQL ?

MySQL Drop VIEW You can drop the VIEW by using the DROP VIEW statement. Syntax: DROP VIEW [IF EXISTS] view_name;  Parameters: view_name: It specifies the name of the VIEW that you want to drop. IF EXISTS: It is optional. If you do not specify this clause and the VIEW doesn't exist, the DROP VIEW statement will return an error. Example: DROP VIEW trainer; To see the dropped VIEW(It will never found): Syntax: SELECT * FROM view_name;  Return empty*** Subscribe channel on  YouTube Read this post on  Blogger Like page on  Facebook Tweet about video on  twitter Let's chat on  whatsapp See you at  Instagram

How to update view in MySQL ?

MySQL Update VIEW In MYSQL, the ALTER VIEW statement is used to modify or update the already created VIEW without dropping it. Syntax: ALTER VIEW view_name AS  SELECT columns  FROM table  WHERE conditions;  Example: The following example will alter the already created VIEW name "trainer" by adding a new column. ALTER VIEW trainer AS  SELECT course_name, course_trainer, course_id  FROM courses;  To see the altered VIEW: SELECT*FROM trainer; Subscribe channel on  YouTube Read this post on  Blogger Like page on  Facebook Tweet about video on  twitter Let's chat on  whatsapp See you at  Instagram

How to create VIEW in MySQL?

MySQL Create VIEW A VIEW is created by SELECT statements. SELECT statements are used to take data from the source table to make a VIEW. Syntax: CREATE [OR REPLACE] VIEW view_name AS  SELECT columns  FROM tables  [WHERE conditions];  Parameters: OR REPLACE: It is optional. It is used when a VIEW already exist. If you do not specify this clause and the VIEW already exists, the CREATE VIEW statement will return an error. view_name: It specifies the name of the VIEW that you want to create in MySQL. WHERE conditions: It is also optional. It specifies the conditions that must be met for the records to be included in the VIEW. The following example will create a VIEW name "trainer". This is a virtual table made by taking data from the table "courses". CREATE VIEW trainer AS  SELECT course_name, course_trainer   FROM courses;  To see the created VIEW: Syntax: SELECT * FROM view_name;  Let's see how it looks the created VIEW: S...

What are the basic phone features and types of phone?

Types of Phones:- CDMA (Code Division Multiple Access) — A network that digitizes communication using a specific frequency; it behaves much like GSM, but the two are not compatible. Before traveling internationally, be sure to find out which is used to make sure your phone will work when you reach your destination. GSM (Global System for Mobile Communications) — A digital cellular network which behaves much like CDMA, but the two are not compatible. GSM is commonly used in Europe. 3G phones — "Third-generation" devices. Third generation technology makes it possible for cell phones to accommodate broadband wireless data in addition to traditional cell phone functionality (e.g. e-mail download and Internet access). There are other Internet technologies that perform similarly but are not called "3G" specifically. Features Accessories — Manufacturers offer a number of accessories that can make phones even more convenient to use, such as hands-free options (hea...

How to TRUNCATE table in MySQL?

MYSQL TRUNCATE statement removes the complete data without removing its structure. The TRUNCATE TABLE statement is used when you want to delete the complete data from a table without removing the table structure. Syntax: TRUNCATE TABLE  table_name; Example: This example specifies how to truncate a table. In this example, we truncate the table "cus_tbl". TRUNCATE TABLE  cus_tbl; See the table: SELECT* FROM cus_tbl; MySQL DROP Table MYSQL DROP table statement removes the complete data with structure. Syntax: DROP TABLE  table_name; Example: This example specifies how to drop a table. In this example, we are dropping the table "cus_tbl". DROP TABLE  cus_tbl; MySQL TRUNCATE Table vs DROP Table:- You can also use DROP TABLE command to delete complete table but it will remove complete table data and structure both. You need to re-create the table again if you have to store some data. But in the case of TRUNCATE TABLE, it removes only table data not st...

Contact Us

Name

Email *

Message *