Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- 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 10740 Articles
AmitDiwan
525 Views
For this, you can use INTERVAL in MySQL. Let us first create a table −mysql> create table DemoTable1509 -> ( -> ArrivalTime datetime -> ); Query OK, 0 rows affected (0.51 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1509 values('2018-01-21 10:20:30'); Query ... Read More
AmitDiwan
215 Views
Use @ for variable and concat_ws() to display concatenated result in the table. Let us first create a table −mysql> create table DemoTable1508 -> ( -> StudentFirstName varchar(20), -> StudentLastName varchar(20) -> ); Query OK, 0 rows affected (0.55 sec)Insert some records in the table using ... Read More
AmitDiwan
2K+ Views
For this, you can use group_concat(). Let us first create a table −mysql> create table DemoTable1507 -> ( -> Name varchar(20), -> PaperSet int -> ); Query OK, 0 rows affected (0.68 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1507 values('Chris', ... Read More
AmitDiwan
382 Views
For this, you can use REPLACE(). Let us first create a table −mysql> create table DemoTable1506 -> ( -> Title text -> ); Query OK, 0 rows affected (0.70 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1506 values('This is MySQL'); Query OK, ... Read More
AmitDiwan
289 Views
For this, you can use CASE statement. Let us first create a table −mysql> create table DemoTable1505 -> ( -> Value integer unsigned, -> Status tinyint(1) -> ); Query OK, 0 rows affected (0.47 sec)Insert some records in the table using insert command −mysql> insert into ... Read More
AmitDiwan
294 Views
Let us first create a table table −mysql> create table DemoTable1504 -> ( -> Id int, -> FirstName varchar(20) -> ); Query OK, 0 rows affected (0.83 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1504 values(101, 'Chris'); Query OK, 1 row ... Read More
AmitDiwan
893 Views
Yes, we can pass NULL as in the below syntax −insert into yourTableName values(NULL, yourValue1, yourValue2, ...N);Let us first create a table −mysql> create table DemoTable1503 -> ( -> ClientId int NOT NULL AUTO_INCREMENT PRIMARY KEY, -> ClientName varchar(20), -> ClientAge int -> ); Query ... Read More
AmitDiwan
265 Views
To get the largest window height of the Console, the code is as follows −Example Live Demousing System; public class Demo{ public static void Main(string[] args){ Console.WriteLine("Largest Window Height of the Console = "+Console.LargestWindowHeight); } }OutputThis will produce the following output −Largest Window Height of the ... Read More
AmitDiwan
168 Views
For this, you can use SUBSTRING_INDEX() along with ORDER BY. Let us first create a table −mysql> create table DemoTable1502 -> ( -> StudentId varchar(40) -> ); Query OK, 0 rows affected (0.54 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1502 values('John_120'); ... Read More
AmitDiwan
110 Views
To get the fourth element of the Tuple, the code is as follows −Example Live Demousing System; public class Demo { public static void Main(String[] args){ var tuple1 = Tuple.Create(75, 200, 500, 700, 100, 1200, 1500); var tuple2 = Tuple.Create(75, 200, 500, 700, 100, ... Read More