DATABASE

Data Types | Database

Introduction In a database, each column of a table has a specific data type. A data type specifies the type of data that column can hold such as character strings, numeric values, and date time values. SQL supplies a set of basic data types that you can use for defining [...]

2020-04-11T16:41:36+05:30Categories: Programming|Tags: |

MySQL Commands | Database

Conmanly Used MySql Commands CommandDescriptionCREATE DATABASE [database_name];Create a databaseSHOW DATABASES;List all databasesUSE [database_name];Switch to a databaseSHOW TABLES;List all the tables in the databaseDESCRIBE [table_name];List all field in databaseDROP DATABASE [database_name];Delete databaseDROP TABLE [table_name];Delete table

2020-04-10T00:09:08+05:30Categories: Programming|Tags: |

Transaction | Database

Introduction A transaction is a sequence of operations performed on a database as a single logical unit of work. The effects of all the statements in a transaction can be either all committed (applied to the database) or all rolled back (undone from the database). A database transaction must be [...]

2020-03-15T21:53:05+05:30Categories: Programming|Tags: |

HAVING Clause | Database

Introduction HAVING clause in SQL is used with the GROUP BY clause to filter groups based on a specified list of conditions. HAVING clause applies to summarized group records, whereas WHERE clause applies to individual records. Syntax Following is the syntax of HAVING clause SELECT column_names FROM table_name WHERE condition [...]

2020-03-15T11:08:02+05:30Categories: Programming|Tags: , |

Aggregate Functions | Database

Introduction An aggregate function performs a calculation one or more values and returns a single value. The aggregate function is often used with the GROUP BY clause and HAVING clause of the SELECT statement. Common aggregate functions are MAX() : Returns the highest value (maximum) in a set of non-NULL [...]

2020-03-15T10:43:25+05:30Categories: Programming|Tags: , |

GROUP BY Clause | Database

Introduction GROUP BY clause in SQL is used to arrange identical data into groups. Groups are determined by the columns that you specify in GROUP BY clause. It returns one records for each group. Syntax GROUP BY clause syntax is SELECT column_names FROM table_name WHERE condition GROUP BY column-names In [...]

2020-03-15T09:00:24+05:30Categories: Programming|Tags: , |

Date and Time | Database

Date To store the date data in the database, use DATE data type. The syntax of DATE is as follows: DATE Default literal string format of a DATE value is as follows: YYYY-DD-MM YYYY is four digit number that represent a year, which ranges from 0001 to 9999.MM is two [...]

2020-03-14T20:32:57+05:30Categories: Programming|Tags: , |

CAST & CONVERT Function | Database

CAST CAST function in SQL converts data from one data type to another. Syntax of the CAST function is as follows: CAST (expression AS [data_type]) data_type is a valid data type in the database you are working with. In below example, SQL implicitly converts the character string '1' to the [...]

2020-03-14T20:33:21+05:30Categories: Programming|Tags: , |

Rounding Numeric Value | Database

Introduction A numeric value can be rounded by built in functions ROUND()FLOOR()CEILING() ROUND ROUND() function rounds a number to a specified number of decimal places. Syntax for the ROUND function is ROUND (number, [decimal_place]) decimal_place indicates the number of decimal points returned. A negative number means the rounding will occur [...]

2020-03-14T20:34:08+05:30Categories: Programming|Tags: , |

String Functions | DATABASE

Introduction SQL built in string functions make it possible for you to find and alter text values. Syntax of the string functions can vary for different database systems. Commonly used string functions are CONCAT()UPPER()LOWER()TRIM()LTRIM()RTRIM()SUBSTRING()LENGTH()STRCMP() Concatenation String concatenation means to append one string to the end of another string. Concatenation can [...]

2020-04-18T21:47:58+05:30Categories: Programming|Tags: , |
Go to Top