To set conditions and replace rows, use MySQL CASE statement. Let us first create a table −mysql> create table DemoTable1481 -> ( -> PlayerScore int -> ); Query OK, 0 rows affected (0.42 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1481 values(454); Query OK, 1 row affected (0.41 sec) mysql> insert into DemoTable1481 values(765); Query OK, 1 row affected (0.14 sec) mysql> insert into DemoTable1481 values(890); Query OK, 1 row affected (0.09 sec)Display all records from the table using select statement −mysql> select * from DemoTable1481;This will produce the following output −+-------------+ ... Read More
To get the total number of elements present in an array, the code is as follows −Example Live Demousing System; public class Demo { public static void Main() { string[] products = { "Electronics", "Accessories", "Clothing", "Toys", "Clothing", "Furniture" }; Console.WriteLine("Products list..."); foreach(string s in products) { Console.WriteLine(s); } Console.WriteLine("Array length = "+products.GetLength(0)); Console.WriteLine("One or more products begin with the letter 'C'? = {0}", Array.Exists(products, ele => ele.StartsWith("C"))); Console.WriteLine("One or more planets begin with 'D'? ... Read More
The not greater than in a query can be written simply like less than or equal to ( ( -> StudentName varchar(40), -> StudentMarks int -> ); Query OK, 0 rows affected (0.50 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1480 values('Chris', 78); Query OK, 1 row affected (0.14 sec) mysql> insert into DemoTable1480 values('Bob', 45); Query OK, 1 row affected (0.13 sec) mysql> insert into DemoTable1480 values('John', 67); Query OK, 1 row affected (0.16 sec) mysql> insert into DemoTable1480 values('Adam', 56); Query OK, 1 row affected (0.14 sec)Display all records ... Read More
To create StringBuilder in C#, the code is as follows −Example Live Demousing System; using System.Text; public class Demo { public static void Main(String[] args) { StringBuilder strBuilder1 = new StringBuilder("Tim"); StringBuilder strBuilder2 = new StringBuilder("Tom"); Console.WriteLine("Is StringBuilder1 equal to StringBuilder2? = "+strBuilder1.Equals(strBuilder2)); } }OutputThis will produce the following output −Is StringBuilder1 equal to StringBuilder2? = FalseExampleLet us see another example − Live Demousing System; using System.Text; public class Demo { public static void Main(String[] args) { StringBuilder strBuilder1 = new StringBuilder("John"); StringBuilder strBuilder2 = new StringBuilder("John"); ... Read More
Please note that you can use SAP.NET connector when your API’s are available on SAP system. If this is not correct, you need to get some ABAP programming to develop RFC functions.You can download SAP.NET connector from SAP Market place. To login to market place you need SAP Partner ID also called S-Id.You can refer to below link for more details:http://weblogs.sqlteam.com/jhermiz/archive/2007/08/14/60282.aspxOther options - if you are running the latest version of SAP ECC system, you need to do some backend development to generate Web Services from these RFC’s and call these web services as SOAP service.To turn RFC into web ... Read More
Yes, we can insert without the auto_increment since it gets inserted on its own. Let us first create a table −mysql> create table DemoTable1479 -> ( -> EmployeeId int NOT NULL AUTO_INCREMENT PRIMARY KEY, -> EmployeeSalary int -> ); Query OK, 0 rows affected (0.86 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1479(EmployeeSalary) values(6800); Query OK, 1 row affected (0.10 sec) mysql> insert into DemoTable1479(EmployeeSalary) values(5600); Query OK, 1 row affected (0.11 sec) mysql> insert into DemoTable1479(EmployeeSalary) values(5700); Query OK, 1 row affected (0.16 sec) mysql> insert into DemoTable1479(EmployeeSalary) values(6900); Query ... Read More
To create an OrderedDictionary in C#, 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", "Books"); dict.Add("B", "Electronics"); dict.Add("C", "Smart Wearables"); dict.Add("D", "Pet Supplies"); dict.Add("E", "Clothing"); dict.Add("F", "Footwear"); Console.WriteLine("OrderedDictionary elements..."); foreach(DictionaryEntry d in dict) { Console.WriteLine(d.Key + " " + d.Value); } Console.WriteLine("Count of ... Read More
To count values from separate tables, the syntax is as follows −Select ( select count(yourColumnName) from yourTableName1) as anyAliasName1, ( select count(yourColumnName) from yourTableName2) as anyAliasName2;Let us first create a table −mysql> create table DemoTable1 -> ( -> Id int -> ); Query OK, 0 rows affected (1.06 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1 values(1); Query OK, 1 row affected (0.16 sec) mysql> insert into DemoTable1 values(NULL); Query OK, 1 row affected (0.15 sec) mysql> insert into DemoTable1 values(2); Query OK, 1 row affected (0.34 sec) ... Read More
The OrderedDictionary class represents a collection of key/value pairs that are accessible by the key or index.Following are the properties of OrderedDictionary class −Sr.noProperty & Description1CountGets the number of key/values pairs contained in the OrderedDictionary collection.2IsReadOnlyGets a value indicating whether the OrderedDictionary collection is read-only.3Item[Int32]Gets or sets the value at the specified index.4Item[Object]Gets or sets the value with the specified key.5KeysGets an ICollection object containing the keys in the OrderedDictionary collection.6ValuesGets an ICollection object containing the values in the OrderedDictionary collection.Following are some of the methods of the OrderedDictionary class −Sr.noMethod & Description1Add(Object, Object)Adds an entry with the specified key ... Read More
For this, use UPDATE command with some mathematical calculations. To delete an id, use the DELETE. Let us first create a table −mysql> create table DemoTable1476 -> ( -> Id int -> ); Query OK, 0 rows affected (0.81 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1476 values(10); Query OK, 1 row affected (0.18 sec) mysql> insert into DemoTable1476 values(20); Query OK, 1 row affected (0.13 sec) mysql> insert into DemoTable1476 values(30); Query OK, 1 row affected (0.12 sec) mysql> insert into DemoTable1476 values(40); Query OK, 1 row affected (0.12 sec)Display all ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP