![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
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
AmitDiwan has Published 11365 Articles
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
367 Views
Let us first create a table −mysql> create table DemoTable651 (Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, Value varchar(100)); Query OK, 0 rows affected (0.59 sec)Insert some records in the table using insert command −mysql> insert into DemoTable651(Value) values('Title'); Query OK, 1 row affected (0.13 sec) mysql> insert into DemoTable651(Value) ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
223 Views
For this, use aggregate function COUNT(). Let us first create a table −mysql> create table DemoTable650 (Value1 int, Value2 int); Query OK, 0 rows affected (0.83 sec)Insert some records in the table using insert command −mysql> insert into DemoTable650 values(100, 500); Query OK, 1 row affected (0.17 sec) mysql> insert ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
80 Views
Let us first create a table −mysql> create table DemoTable649 (Value text); Query OK, 0 rows affected (0.68 sec)Insert some records in the table using insert command −mysql> insert into DemoTable649 values('1903'); Query OK, 1 row affected (0.08 sec) mysql> insert into DemoTable649 values('9321010'); Query OK, 1 row affected (0.14 ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
400 Views
Let us first create a table. One of the columns is set as TIMESTAMP −mysql> create table DemoTable648( UserId int NOT NULL AUTO_INCREMENT, UserLoginTime TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARYKEY(UserId) ); Query OK, 0 rows affected (0.66 sec)Insert some records in the table using insert command. Here, we ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
96 Views
Use RAND() for random, whereas LIMIT 3 for the number of values i.e. 3 here −select yourColumnName from yourTableName order by rand() limit 3;Let us first create a table −mysql> create table DemoTable646 ( Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, FirstName varchar(100) ); Query OK, 0 rows affected ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
310 Views
For this, use UNION. Let us first create a table −mysql> create table DemoTable645 (Id int, FirstName varchar(100)); Query OK, 0 rows affected (0.67 sec)Insert some records in the table using insert command −mysql> insert into DemoTable645 values(100, 'Chris'); Query OK, 1 row affected (0.15 sec) mysql> insert into DemoTable645 ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
109 Views
For this, use CONCAT(). Let us first create a table −mysql> create table DemoTable644 (Title text); Query OK, 0 rows affected (0.81 sec)Insert some records in the table using insert command −mysql> insert into DemoTable644 values('Introduction'); Query OK, 1 row affected (0.14 sec) mysql> insert into DemoTable644 values('Welcome in course'); ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
142 Views
Let us first create a table −mysql> create table DemoTable643 (ClientId int); Query OK, 0 rows affected (0.86 sec)Insert some records in the table using insert command −mysql> insert into DemoTable643 values(1000); Query OK, 1 row affected (0.19 sec)Display all records from the table using select statement −mysql> select *from ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
103 Views
Let us first create a table −mysql> create table DemoTable642( EmployeeId int NOT NULL AUTO_INCREMENT PRIMARY KEY, EmployeeName archar(100), EmployeeCompanyNamevarchar(100) ); Query OK, 0 rows affected (0.81 sec)Insert some records in the table using insert command −mysql> insert into DemoTable642(EmployeeName, EmployeeCompanyName) values('John', 'Google'); Query OK, 1 row affected (0.16 ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
190 Views
Let us first create a table −mysql> create table DemoTable1 (Id int, Name varchar(100)); Query OK, 0 rows affected (0.89 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1 values(100, 'John'); Query OK, 1 row affected (0.19 sec) mysql> insert into DemoTable1 values(110, 'Chris'); Query OK, ... Read More