- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 6702 Articles for Database
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
146 Views
Let us first create a table −mysql> create table DemoTable1449 -> ( -> PlayerId int NOT NULL AUTO_INCREMENT PRIMARY KEY, -> PlayerScore int -> ); Query OK, 0 rows affected (0.69 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1449(PlayerScore) values(1040); Query OK, 1 row affected (0.12 sec) mysql> insert into DemoTable1449(PlayerScore) values(1450); Query OK, 1 row affected (0.34 sec) mysql> insert into DemoTable1449(PlayerScore) values(1890); Query OK, 1 row affected (0.72 sec) mysql> insert into DemoTable1449(PlayerScore) values(1650); Query OK, 1 row affected (0.25 sec)Display all records from the table using select statement ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
733 Views
Let us first create a table −mysql> create table DemoTable1448 -> ( -> StartDate date, -> EndDate date -> ); Query OK, 0 rows affected (0.46 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1448 values('2019-01-21', '2019-03-22'); Query OK, 1 row affected (0.16 sec) mysql> insert into DemoTable1448 values('2019-04-05', '2019-10-10'); Query OK, 1 row affected (0.13 sec) mysql> insert into DemoTable1448 values('2019-10-01', '2019-10-29'); Query OK, 1 row affected (0.11 sec) mysql> insert into DemoTable1448 values('2018-12-31', '2019-12-31'); Query OK, 1 row affected (0.12 sec)Display all records from the table using select statement −mysql> ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
128 Views
For this, you can use REGEXP in MySQL. Let’s say you want the row records wherein any of the comma separated value is 90. For this, use regular expression.Let us first create a table −mysql> create table DemoTable1447 -> ( -> Value varchar(100) -> ); Query OK, 0 rows affected (0.58 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1447 values('19, 58, 90, 56'); Query OK, 1 row affected (0.13 sec) mysql> insert into DemoTable1447 values('56, 89, 99, 100'); Query OK, 1 row affected (0.21 sec) mysql> insert into DemoTable1447 values('75, 76, 65, ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
276 Views
To find the difference, use the DATEDIFF() method. Let us first create a table −mysql> create table DemoTable1446 -> ( -> DueDate date -> ); Query OK, 0 rows affected (1.42 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1446 values('2019-01-21'); Query OK, 1 row affected (0.69 sec) mysql> insert into DemoTable1446 values('2019-02-01'); Query OK, 1 row affected (0.44 sec) mysql> insert into DemoTable1446 values('2019-09-30'); Query OK, 1 row affected (0.16 sec)Display all records from the table using select statement −mysql> select * from DemoTable1446;This will produce the following output −+------------+ | DueDate ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
618 Views
To set conditions in a stored procedure, use IF...ELSE in MySQL. Following is the syntax for if-else −IF yourCondition then yourStatement1, ELSE yourStatement2, END IF;Let us implement the above syntax in a stored procedure −mysql> DELIMITER // mysql> CREATE PROCEDURE IF_ELSE_DEMO(IN value int) -> BEGIN -> SET @val=value; -> IF @val > 10 then -> select concat(@val, ' is greater than 10'); -> ELSE -> select concat(@val, ' is less than 10 '); -> END ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
347 Views
To get string as date, use STR_TO_DATE() method. Let us first create a table −mysql> create table DemoTable1445 -> ( -> AdmissionDate varchar(20) -> ); Query OK, 0 rows affected (0.46 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1445 values('01.10.2019'); Query OK, 1 row affected (0.19 sec) mysql> insert into DemoTable1445 values('31.12.2018'); Query OK, 1 row affected (0.23 sec) mysql> insert into DemoTable1445 values('01.02.2017'); Query OK, 1 row affected (0.11 sec)Display all records from the table using select −mysql> select * from DemoTable1445;This will produce the following output −+---------------+ | AdmissionDate | ... Read More
![Mahesh Parahar](https://www.tutorialspoint.com/assets/profiles/127878/profile/60_2277600-1655382864.jpg)
277 Views
DatabaseDatabase represents a data structure comprised of tables, schemas to store user and system information. It provides SQL to Create, Read, Delete and Update its records. DBMS, Database management systems manages a database. Usually Database administrators modifies the sensitive data. A database follows client-server model architecture.BlockchainBlockchain represents a chain of blocks analogous to records in database. This chain grows as blocks are added to it during operations. These blocks contains link to previous block using cryptographic hash of address of the block, timestamp and transaction data. A block once added to the blockchain cannot be modified by design. A Blockchain ... Read More
![Mahesh Parahar](https://www.tutorialspoint.com/assets/profiles/127878/profile/60_2277600-1655382864.jpg)
18K+ Views
Linear Data StructuresA Linear data structure have data elements arranged in sequential manner and each member element is connected to its previous and next element. This connection helps to traverse a linear data structure in a single level and in single run. Such data structures are easy to implement as computer memory is also sequential. Examples of linear data structures are List, Queue, Stack, Array etc.Non-linear Data StructuresA non-linear data structure has no set sequence of connecting all its elements and each element can have multiple paths to connect to other elements. Such data structures supports multi-level storage and often ... Read More
![Kiran Kumar Panigrahi](https://www.tutorialspoint.com/assets/profiles/390736/profile/60_2598-1635242143.png)
5K+ Views
In database management systems (DBMS), there are two terms namely mirroring and replication which are related to copying of data. Mirroring is defined as the process of copying a database to another location, while replication is defined as the process of copying the database objects from one database to another. Read this article to learn more about mirroring and replication and how they are different from each other. What is Mirroring? Mirroring refers to keeping a backup database server for a master database server. If for some reason, the master database is down, then the mirror database can be used ... Read More
![Kiran Kumar Panigrahi](https://www.tutorialspoint.com/assets/profiles/390736/profile/60_2598-1635242143.png)
35K+ Views
Anybody dealing with databases must comprehend the distinction between DDL and DML commands because it has an impact on how data is saved, accessed, and modified. A collection of commands called DDL are used to specify a database's structure. Database objects including tables, views, indexes, and constraints can be created, modified, and deleted using these commands. DDL statements specify how the data is arranged and accessed rather than altering the data that is stored in the database. DML, on the other hand, is a set of instructions used to work with the data that is kept in the ... Read More