What is Schema in SQL ?

A schema is a collection of database objects (tables, views, functions, indexes ,etc) associated with one particular database username. This username is called the schema owner. A database can have one or multiple schemas. An object within a schema is qualified using the schema_name.object_name format. Say a user's database username [...]

By |2020-09-30T13:14:36+05:30September 30th, 2020|Categories: Programming|Tags: , |

Create Database in MySQL

A database is a directory that contains all files which correspond to tables in the database. To create a new database in MySQL, use following syntax: CREATE DATABASE [IF NOT EXISTS] database_name [CHARACTER SET charset_name] [COLLATE collation_name] It will create a new database, where database_name : Name of the database. [...]

By |2020-09-29T15:24:30+05:30September 29th, 2020|Categories: 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 [...]

By |2020-03-15T11:08:02+05:30March 15th, 2020|Categories: 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 [...]

By |2020-03-15T10:43:25+05:30March 15th, 2020|Categories: 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 [...]

By |2020-03-15T09:00:24+05:30March 15th, 2020|Categories: 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 [...]

By |2020-03-14T20:32:57+05:30March 14th, 2020|Categories: 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 [...]

By |2020-03-14T20:33:21+05:30March 14th, 2020|Categories: 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 [...]

By |2020-03-14T20:34:08+05:30March 14th, 2020|Categories: 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 [...]

By |2020-04-18T21:47:58+05:30March 14th, 2020|Categories: Programming|Tags: , |

JOIN Statement | Database

Introduction JOIN is used to fetch data from two or more tables. It is used for combining column from two or more tables by using values common to both tables. JOIN allow you to combine data from two tables. Join Type Following are the types of JOIN: JOIN: Select all [...]

By |2020-03-14T20:34:09+05:30March 14th, 2020|Categories: Programming|Tags: , |
Go to Top