Book Image

MySQL 8 for Big Data

By : Shabbir Challawala, Chintan Mehta, Kandarp Patel, Jaydip Lakhatariya
Book Image

MySQL 8 for Big Data

By: Shabbir Challawala, Chintan Mehta, Kandarp Patel, Jaydip Lakhatariya

Overview of this book

With organizations handling large amounts of data on a regular basis, MySQL has become a popular solution to handle this structured Big Data. In this book, you will see how DBAs can use MySQL 8 to handle billions of records, and load and retrieve data with performance comparable or superior to commercial DB solutions with higher costs. Many organizations today depend on MySQL for their websites and a Big Data solution for their data archiving, storage, and analysis needs. However, integrating them can be challenging. This book will show you how to implement a successful Big Data strategy with Apache Hadoop and MySQL 8. It will cover real-time use case scenario to explain integration and achieve Big Data solutions using technologies such as Apache Hadoop, Apache Sqoop, and MySQL Applier. Also, the book includes case studies on Apache Sqoop and real-time event processing. By the end of this book, you will know how to efficiently use MySQL 8 to manage data for your Big Data applications.
Table of Contents (17 chapters)
Title Page
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Customer Feedback
Preface

Insert, replace, and update statements in MySQL 8


Insert, replace, and update statements are used to insert or modify data in the database. Let's take a look at them one by one.

Insert

INSERT inserts new rows into an existing table; the following is the syntax to add new rows to a table:

INSERT[INTO] tbl_name [(field_name1, field_name2...)] {VALUES|VALUE} ({value of filed 1},value of filed 2,...),(...),...

The following inserts new users into the user table:

Insert INTO user (first_name,last_name,email,password) VALUES 
("Robert","Dotson","[email protected]","17500917b5cd7cefdb57e87ce73485d3"),
("Ruth","Uselton","[email protected]","17500917b5cd7cefdb57e87ce73485d3");

Update

UPDATE modifies data into an existing table; the following is the syntax to add new rows to a table:

UPDATEtable_referenceSETfield_name1="value"[,field_name2="value"]...
[WHEREwhere_condition]
[ORDERBY...]
[LIMITrow_count]

The following UPDATE statement is used to update the first name in the users table:

UPDATE...