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
3K+ Views
You need to use index to select multiple rows effectively. Let us first create a table −mysql> create table DemoTable1501 -> ( -> Id int NOT NULL PRIMARY KEY, -> URL text -> ); Query OK, 0 rows affected (0.62 sec)Here is the query to create ... Read More
AmitDiwan
120 Views
To get the number of key/values pairs contained in OrderedDictionary, the code is as follows −Example Live Demousing System; using System.Collections; using System.Collections.Specialized; public class Demo { public static void Main(){ OrderedDictionary dict = new OrderedDictionary(); dict.Add("A", "Home Appliances"); dict.Add("B", "Electronics"); ... Read More
AmitDiwan
89 Views
To return fields appearing a certain number of times, the syntax is as follows −select distinct yourColumnName, count(yourColumnName) from yourTableName where yourColumnName LIKE 'J%' group by yourColumnName having count(*) > 1 order by yourColumnName;Let us first create a table −mysql> create table DemoTable1500 -> ( -> Name varchar(20) ... Read More
AmitDiwan
135 Views
To check if HybridDictionary is synchronized, the code is as follows −Example Live Demousing System; using System.Collections; using System.Collections.Specialized; public class Demo { public static void Main(){ HybridDictionary dict1 = new HybridDictionary(); dict1.Add("A", "Books"); dict1.Add("B", "Electronics"); dict1.Add("C", "Smart ... Read More
AmitDiwan
251 Views
For this, you can use GROUP BY along with ORDER BY clause. Let us first create a table −mysql> create table DemoTable1499 -> ( -> StudentName varchar(20), -> StudentMarks int -> ); Query OK, 0 rows affected (0.46 sec)Insert some records in the table using insert ... Read More
AmitDiwan
252 Views
To check if the input is redirected on the Console or not, the code is as follows −Example Live Demousing System; public class Demo{ public static void Main(string[] args){ Console.WriteLine("Input Redirected? = "+Console.IsInputRedirected); } }OutputThis will produce the following output −Input Redirected? = FalseExampleTo check if ... Read More
AmitDiwan
813 Views
To duplicate a MySQL database, the syntax is as follows −create table yourdatabaseName1.yourTableName1 select * from yourdatabaseName2.yourTableName2;Let us first create a table −mysql> use sample; Database changed mysql> create table DemoTable101 -> ( -> Id int, -> Name varchar(20) -> ); Query OK, 0 rows affected ... Read More
AmitDiwan
386 Views
To check if Caps Lock is on or off through Console, the code is as follows −Example Live Demousing System; public class Demo{ public static void Main(string[] args){ Console.WriteLine("The CAPS LOCK is on or not? "+ Console.CapsLock); } }OutputThis will produce the following output −The CAPS ... Read More
AmitDiwan
932 Views
To search a column value with %, the syntax is as follows −select * from yourTableName where yourColumnName LIKE '\%%';Let us first create a table −mysql> create table DemoTable1497 -> ( -> Name varchar(20) -> ); Query OK, 0 rows affected (0.55 sec)Insert some records in the ... Read More
AmitDiwan
587 Views
Let us first create a table −mysql> create table DemoTable1496 -> ( -> Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, -> PassengerCode varchar(20), -> ArrivalDate datetime -> ); Query OK, 0 rows affected (0.85 sec)Insert some records in the table using insert command −mysql> insert ... Read More