So who should take this course this course is meant for database professionals who want to expand their skill set. Let me answer a few basic questions for you first, and that is who, what and why. My name is Barbara and I work for Salesforce as a senior database engineer, I have over 12 years of experience with a variety of databases Oracle being the main one, I have experience working with companies like Chase, PayPal, Wells, Fargo, StubHub, etc. Welcome to this basic MySQL course I want to start by appreciating you for trying to learn a new skill. MySQL is one of the most popular databases, learn how to use it in this course from a senior database engineer. Watch the full course below or on the YouTube channel (2-hour watch). SQL Basics - Reading data (Select statements).SQL Basics - Updating and Deleting Data.Here are the topics covered in this course: Then it also goes into key database concepts such as Data Modeling, Locks, Indexes, SQL Explain, and more. He is a senior database engineer and great teacher. We just published a MySQL Database course on the YouTube channel.īharath Ram Manoharan from Execute on Command created this course. The following select statement has a where condition which displays the employee records who belong to Technology department and getting a salary >= 7000.MySql is one of the most popular databases. To view only a specific columns from a table, specify the column names in the select command. To view all the records from a table, use the following select statement. Note: You can also upload data from a text file to MySQL database using mysqlimport command. mysql> insert into employee(name,dept) values('Ritu', 'Accounting') To insert values only to specific columns, you should specify the column names as shown below. Insert into employee values(500,'Randy','Technology',6000) Insert into employee values(400,'Nisha','Marketing',9500) Insert into employee values(300,'Mayla','Technology',7000) Insert into employee values(200,'Jason','Technology',5500) insert into employee values(100,'Thomas','Sales',5000) Just specify the values in the same sequence as the column names. While inserting values to all the columns in the table, you don’t need to specify the column name. Use the following sample insert commands to insert some records to the employee table. | id | int(11) | NO | PRI | NULL | auto_increment |Ĥ rows in set (0.01 sec) 4. | Field | Type | Null | Key | Default | Extra | To view the table description, do the following. You can also use any one of the following data types.ĭo the following to view all the tables available in the database. The end of a SQL command is identified by a semi-colon. When you copy-paste the above create table command in the “mysql> ” prompt, it will display the continuation prompt “->” starting from the 2nd line, which indicates that the command is still not over. The following example creates a employee table. To connect to the database, do the following. Create MySQL TableĬonnect to the newly created database using “use” command before you can perform any operation in the database. mysql> show databases ģ rows in set (0.00 sec) 3. Use “show databases” command to verify that the database was created successfully. The following command will create the database called “thegeekstuff”. # mysql -u root -pĪfter connecting as MySQL root user, execute the following command from the “mysql> ” prompt to create a database. Once MySQL is installed, connect to it using MySQL root user and create the database as shown below. If you want to install MySQL along with the other components of the LAMP stack (Apache, and PHP), follow this article: How to install or upgrade LAMP.You can also use yum groupinstall to install the MySQL Database group.If you are installing on RedHat based distro (for example: CentOS), follow this article: Install MySQL on Linux using rpm.Go to the MySQL download page, and select your appropriate platform to download the latest version of MySQL community server. This explains how to install MySQL, create a sample database, create a table, insert records into the table, and select records from the table. This MySQL jumpstart guide will get you running quickly on the basics.
0 Comments
Leave a Reply. |