Showing entries 11 to 20 of 27
« 10 Newer Entries | 7 Older Entries »
Displaying posts with tag: MySQL Tutorial (reset)
MySQL Data Types Explained

This tutorial explains all MySQL data types, their characteristics, and min, max as well as possible default values. We’ll describe their usages so that you can use them efficiently for creating schemas and tables. A MySQL table can have one or more fields with specific data types such as a string or date. However, there are more available in MySQL to ease up your job of collecting and storing data. It is also crucial that you understand which data type should you use and when. Here are some standard goals that define them what do they represent: 1. The data,

The post MySQL Data Types Explained appeared first on Learn Programming and Software Testing.

MySQL TIMESTAMP with Simple Examples

This tutorial explains MySQL TIMESTAMP and TIMESTAMP field characteristics such as automated initialization and updating. We’ll describe their usages with the help of simple examples. 1. TIMESTAMP Syntax 2. TIMESTAMP Simple Examples 3. Set Timezone and Use Timestamp 4. Auto Init and Update Timestamp Let’s now go through each of the section one by one. MySQL TIMESTAMP The MySQL TIMESTAMP is a transient data type that contains a mixture of date and time. It is exactly 19 characters long. The structure of a TIMESTAMP field is as follows: Syntax # MySQL Timestamp YYYY-MM-DD HH:MM:SS The TIMESTAMP value shows in UTC

The post MySQL TIMESTAMP with Simple Examples appeared first on Learn Programming and Software Testing.

MySQL Insert Statement to Add Rows

This tutorial explains the MySQL INSERT command to insert single and multiple rows in a table. Here, you’ll find some unique ways with different variations for adding records with fully working examples. 1. INSERT Statement Syntax 2. INSERT Single Row 3. INSERT Default Values 3. INSERT Date Columns 4. INSERT Multiple Rows Let’s now read and understand each of the section one by one. MySQL INSERT statement As stated initially, the INSERT command is a built-in MySQL statement which inserts the specified records into a given table. So, let’s first check the details and see how to use the INSERT

The post MySQL Insert Statement to Add Rows appeared first on Learn Programming and Software Testing.

MySQL Aggregate Functions

This tutorial explains the use of MySQL aggregate functions like AVG, COUNT, SUM, MAX, MIN with the help of simple examples. Aggregate functions are a bunch of methods that operate on a set of values. They can do calculations for us and then returns one final value. For example, you may like to compute the sum of the data values in a given field. The following are aggregate functions that we are covering in this tutorial. 1. COUNT function 2. MIN function 3. MAX function 4. SUM function 5. AVG function MySQL Aggregate Functions with Examples Before we go through

The post MySQL Aggregate Functions appeared first on Learn Programming and Software Testing.

MySQL OPTIMIZE TABLE Statement

This tutorial explains MySQL OPTIMIZE TABLE statement which defrags tables and recovers unused space. We’ll describe the complete usage of this method with the help of simple examples. If your database is receiving a lot of deletes and updates calls, then it might lead to fragmentation in your MySQL data files. Therefore, a lot of unused space would go in vain, and also put a high impact on the performance. So, experts recommend that you must defrag your MySQL tables regularly. Hence, we’ll today explain how to use the MySQL OPTIMIZE TABLE to defrag tables and free up space. MySQL OPTIMIZE

The post MySQL OPTIMIZE TABLE Statement appeared first on Learn Programming and Software Testing.

MySQL CONCAT to Concatenate Strings

This tutorial explains MySQL CONCAT() which is a built-in String function. It takes variable no. of strings as input and concatenates them together. We’ll describe the usages of this method with the help of simple examples. MySQL string concatenation is more user-friendly than other databases such as PostgreSQL or Oracle. They provide a string concatenation operator “||” instead of a proper function. However, MS SQL server does the same job using the addition arithmetic operator (+). 1. CONCAT() Syntax 2. CONCAT() Simple Examples 4. CONCAT() with Tables Let’s now go through each of the section one by one. MySQL CONCAT()

The post MySQL CONCAT to Concatenate Strings appeared first on Learn Programming and Software Testing.

MySQL DROP TABLE with Simple Examples

This tutorial explains MySQL DROP TABLE statement which deletes the specified tables from the in-use database. We’ll describe several usages of this method with the help of simple examples. 1. DROP TABLE Syntax 2. DROP TABLE If Exist 3. DROP TABLE Matching Pattern 4. DROP TABLE Full Example Let’s now read and understand each of the section one by one. MySQL DROP TABLE statement As stated initially, the DROP TABLE is a built-in MySQL statement which removes a specified table from the database. So, let’s first check the details and see how to use the DROP command. But first, create

The post MySQL DROP TABLE with Simple Examples appeared first on Learn Programming and Software Testing.

MySQL ABS Function with Simple Examples

This tutorial explains MySQL ABS() which is a Math/Trig function. It takes a number as input and determines its absolute (positive) value. We’ll describe the usages of this method with the help of simple examples. 1. ABS() Syntax 2. ABS() Simple Examples 3. ABS() for Expression 4. ABS() with Tables Let’s now go through each of the section one by one. MySQL ABS() Function As stated initially, ABS() is a built-in MySQL function which does some math calculation to derive the absolute value of a number. In Maths term, an absolute value represents the length of a number on the

The post MySQL ABS Function with Simple Examples appeared first on Learn Programming and Software Testing.

MySQL DATE_ADD Function with Simple Examples

This tutorial explains MySQL DATE_ADD function which adds up a slice of time (in days/hours, e.g., 1 day or 10 days) to the given date. We’ll describe the complete date arithmetic of this method with the help of simple examples. 1. DATE_ADD() Syntax 2. DATE_ADD() with -ve Interval 3. DATE_ADD() for Invalid Date 4. DATE_ADD() for Auto Adjustment Let’s now go through each of the section one by one. MySQL DATE_ADD() Function As stated initially, DATE_ADD() is a built-in MySQL function which adds the specified no. of days to a given date. So, let’s now see the details and check

The post MySQL DATE_ADD Function with Simple Examples appeared first on Learn Programming and Software Testing.

MySQL DATE_SUB Function with Simple Examples

This tutorial explains MySQL DATE_SUB function which subtracts a slice of time (in days/hours, e.g., 1 day or 10 days) from the given date. We’ll describe the complete date arithmetic of this method with the help of simple examples. 1. DATE_SUB() Syntax 2. DATE_SUB() with -ve Interval 3. DATE_SUB() for Invalid Date 4. DATE_SUB() for Auto Adjustment Let’s now go through each of the section one by one. MySQL DATE_SUB() Function As stated initially, DATE_SUB() is a built-in MySQL function which subtracts the specified no. of days from a given date. So, let’s now see the details and check out

The post MySQL DATE_SUB Function with Simple Examples appeared first on Learn Programming and Software Testing.

Showing entries 11 to 20 of 27
« 10 Newer Entries | 7 Older Entries »