Posts

Showing posts from June, 2019

Data type in MySQL Part - 2

Image
Hello and welcome everyone. In the previous article, we have learned about Numeric Data type. Now in this article, we will learn String Data type. Let’s go. MongoDB with .Net Core course link => https://www.udemy.com/mongodb-with-net-core-sagar-jaybhay/ C# basic course click on: https://www.udemy.com/learn-csharp-with-sagar-jaybhay/  Web API 2- .Net Core In depth In 5 Hours click on: https://www.udemy.com/web-api-2-net-core-in-depth-in-5-hrs-with-sagar-jaybhay/ String Data type CHAR () VARCHAR () BINARY () VARBINARY () BLOB ( Binary Large Objects ) () TEXT () TINYBLOB () TINYTEXT () MEDIUMBLOB () MEDIUMTEXT () LONGBLOB () LONGTEXT () ENUM () SET () Now let see in details one by one: CHAR () CHAR data type is a fixed length string (in this contain is letters, numbers and special characters), where size is the number of characters to store in the database. A char data type length is from 0 to 255. For example, is CHAR (10). VA

Data type in MySQL Part - 1

Image
Hello and welcome everyone. In this article, we will learn about Data type and its type. Let’s go. MongoDB with .Net Core course link => https://www.udemy.com/mongodb-with-net-core-sagar-jaybhay/ C# basic course click on: https://www.udemy.com/learn-csharp-with-sagar-jaybhay/  Web API 2- .Net Core In depth In 5 Hours click on: https://www.udemy.com/web-api-2-net-core-in-depth-in-5-hrs-with-sagar-jaybhay/ Data type You optimize your database you should use the type and size of the field in your database table (in MySQL every column in a database table is required to have a name and a data type). A data type is a specifies the possible values for that type, that specifies a particular data type, for example, floating points, integer, varchar, Boolean, date and time, etc. When creating a table what type of data will be stored. MySQL has three most important data type 1.    Data and Time 2.    Numeric 3.    String Data and Time Data type DATE ()

MySQL Constraint – DEFAULT

Image
MongoDB with .Net Core course link => https://www.udemy.com/mongodb-with-net-core-sagar-jaybhay/ C# basic course click on: https://www.udemy.com/learn-csharp-with-sagar-jaybhay/  Web API 2- .Net Core In depth In 5 Hours click on: https://www.udemy.com/web-api-2-net-core-in-depth-in-5-hrs-with-sagar-jaybhay/ Hello everyone in the previous article we learn about MySQL Constraint – CHECK and in this article, we will learn DEFAULT constraint with example. Let’s go. What is DEFAULT Constraint? MySQL DEFAULT constraint sets a default value for a column when the insert into statement does not provide a specific value. Default constraint helps you assign a particular default value to every row of a column.   Only if specifically indicated DEFAULT constraint has been applied then a value different from the default can be stored in a field. Following is the CREATE TABLE statement with DEFAULT constraint syntax : CREATE TABLE table_name (                       

MySQL Constraint – CHECK

Image
MongoDB with .Net Core course link => https://www.udemy.com/mongodb-with-net-core-sagar-jaybhay/ Hello everyone in the previous article we learn about MySQL Constraint –FOREIGN KEY and in this article, we will learn CHECK constraint with example. Let’s go. C# basic course click on: https://www.udemy.com/learn-csharp-with-sagar-jaybhay/  Web API 2- .Net Core In depth In 5 Hours click on: https://www.udemy.com/web-api-2-net-core-in-depth-in-5-hrs-with-sagar-jaybhay/ What is CHECK constraint? MySQL CHECK constraint controls the values in a column satisfies a specific condition. CHECK constraint defines on a table it can limit the values on specific columns based on values in other columns in the row. Following is the CREATE TABLE statement with CHECK constraint syntax:                              CREATE TABLE table_name(                                             Column1_name data type CHECK (condition)                                           

MySQL Constraint – FOREIGN KEY

Image
Hello everyone in the previous article we learn about MySQL Constraint – PRIMARY KEY and in this article, we will learn FOREIGN KEY constraint with example. Let’s go. MongoDB with .Net Core course link => https://www.udemy.com/mongodb-with-net-core-sagar-jaybhay/ What is the FOREIGN KEY? MySQL FOREIGN KEY constraint uniquely identifies a row or record in another table. Foreign key constraint creates a link between two table’s matches the Primary key in one of the tables with a foreign key in the 2nd table. Foreign key also called reference key. C# basic course click on: https://www.udemy.com/learn-csharp-with-sagar-jaybhay/  Web API 2- .Net Core In depth In 5 Hours click on: https://www.udemy.com/web-api-2-net-core-in-depth-in-5-hrs-with-sagar-jaybhay/ FOREIGN Key points to a column of another table and accordingly links the two tables.   A Foreign Key field of fields from one table called the child table and it refers to a column in another table called

MySQL Constraint – PRIMARY KEY

Image
C# basic course click on: https://www.udemy.com/learn-csharp-with-sagar-jaybhay/  Web API 2- .Net Core In depth In 5 Hours click on: https://www.udemy.com/web-api-2-net-core-in-depth-in-5-hrs-with-sagar-jaybhay/ Hello everyone in the previous article we learn about MySQL Constraint – UNIQUE and in this article, we will learn PRIMARY KEY constraint with example. Let’s go. MongoDB with .Net Core course link => https://www.udemy.com/mongodb-with-net-core-sagar-jaybhay/ What is the PRIMARY KEY? MySQL PRIMARY KEY constraint uniquely identifies each row in a table and also it creates a unique index for accessing the table will access faster. The columns of a Primary Key cannot have null values in MySQL and it must contain unique values. A Primary key has only one on a table, if the primary key used with multiple fields, then they are called a Composite Key. Syntax 1 for creating PRIMARY KEY with CREATE table statement.                               CREATE