- 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
Kumar Varma has Published 110 Articles
Kumar Varma
610 Views
For this, you can use GROUP BY HAVING clause. Let us first create a table −mysql> create table DemoTable -> ( -> Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, -> Subject varchar(100) -> ); Query OK, 0 rows affected (0.53 sec)Insert some records in the table ... Read More
Kumar Varma
183 Views
Use CASE statement for this. Let us first create a table −mysql> create table DemoTable -> ( -> StudentMarks int, -> isValid tinyint(1) -> ); Query OK, 0 rows affected (0.68 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values(45, 0); ... Read More
Kumar Varma
148 Views
Let us first create a table −mysql> create table DemoTable1 -> ( -> StudentId int, -> StudentName varchar(20) -> ); Query OK, 0 rows affected (0.64 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1 values(10, 'John'); Query OK, 1 row affected ... Read More
Kumar Varma
220 Views
Let us first create a table −mysql> create table DemoTable -> ( -> Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, -> Name varchar(100), -> Age int -> ); Query OK, 0 rows affected (0.49 sec)Insert some records in the table using insert command −mysql> insert ... Read More
Kumar Varma
107 Views
You can use DATE_ADD() function from MySQL. Let us first create a table −mysql> create table DemoTable -> ( -> ShippingDate varchar(100) -> ); Query OK, 0 rows affected (0.67 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('06-01-2019'); Query OK, 1 ... Read More
Kumar Varma
189 Views
You can use TIME_FORMAT(). Let us first create a table −mysql> create table DemoTable -> ( -> PunchIn time, -> PunchOut time, -> Launch time -> ); Query OK, 0 rows affected (0.50 sec)Insert some records in the table using insert command −mysql> insert into ... Read More
Kumar Varma
89 Views
For this, use the following syntax, wherein we have used SHOW GRANTS −SHOW GRANTS FOR 'yourUserName'@'yourHostName';HostName may be ‘%’ or localhost.Let us implement the above syntax in order to show grants from ROOT −mysql> SHOW GRANTS FOR 'root'@'%' ;Output+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Grants for root@% ... Read More
Kumar Varma
448 Views
Let us first create a table −mysql> create table DemoTable -> ( -> FirstName varchar(100), -> Age int, -> Score int -> ); Query OK, 0 rows affected (0.62 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('Robert', 21, 78); ... Read More
Kumar Varma
155 Views
Use MAX() function along with SUBSTRING() for this. Let us first create a table −mysql> create table DemoTable -> ( -> Id varchar(200) -> ); Query OK, 0 rows affected (0.52 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('2019-0515-1980'); Query OK, ... Read More
Kumar Varma
771 Views
Long-press (also known as press-and-hold) gestures detect one or more fingers touching the screen for an extended period of time. You configure the minimum duration required to recognize the press and the number of times the fingers must be touching the screen. (The gesture recognizer is triggered only by the ... Read More