AmitDiwan has Published 11365 Articles

How to order and select query with conditions in MySQL?

AmitDiwan

AmitDiwan

Updated on 05-Nov-2019 09:25:38

174 Views

Following is the syntax −select * from yourTableName order by yourColumnName=0, yourColumnName;Let us first create a table −mysql> create table DemoTable1348    -> (    -> Amount int    -> ); Query OK, 0 rows affected (0.80 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1348 ... Read More

Update a column based on another MySQL table’s column

AmitDiwan

AmitDiwan

Updated on 05-Nov-2019 09:23:40

435 Views

For this, you can use the join concept. Let us first create a table −mysql> create table DemoTable1    -> (    -> Id int,    -> Name varchar(10)    -> ); Query OK, 0 rows affected (0.51 sec)Insert some records in the table using insert command −mysql> insert into ... Read More

Char.ConvertToUtf32(String, Int32) Method in C#

AmitDiwan

AmitDiwan

Updated on 05-Nov-2019 09:13:24

200 Views

The Char.ConvertToUtf32(String, Int32) method in C# is used to convert the value of a UTF-16 encoded character or surrogate pair at a specified position in a string into a Unicode code point.SyntaxFollowing is the syntax −public static int ConvertToUtf32 (string str, int index);Above, str is the string that contains a ... Read More

How to mask user email addresses with a different domain in MySQL?

AmitDiwan

AmitDiwan

Updated on 05-Nov-2019 08:40:59

383 Views

Let us first create a table −mysql> create table DemoTable1345    -> (    -> UserEmailAddress text    -> ); Query OK, 0 rows affected (0.42 sec)Insert some records in the table using insert command. We have inserted email address here −mysql> insert into DemoTable1345 values('Carol123@gmail.com'); Query OK, 1 row ... Read More

Convert.ToBoolean(String, IFormatProvider) Method in C#

AmitDiwan

AmitDiwan

Updated on 05-Nov-2019 08:15:27

254 Views

The Convert.ToBoolean() method in C# is used to convert a specified value to an equivalent Boolean value.SyntaxFollowing is the syntax −public static bool ToBoolean (string val, IFormatProvider provider);Above, Val is a string that contains the value of either TrueString or FalseString, whereas the provider is an object that supplies culture-specific ... Read More

DateTime.DaysInMonth() Method in C#

AmitDiwan

AmitDiwan

Updated on 05-Nov-2019 08:12:53

2K+ Views

The DateTime.DaysInMonth() method in C# is used to return the number of days in the specified month and year. For example, 31 for month value 1 i.e. January.SyntaxFollowing is the syntax −public static int DaysInMonth (int year, int month);ExampleLet us now see an example to implement the DateTime.DaysInMonth() method −using ... Read More

UInt16.MaxValue Field in C# with Examples

AmitDiwan

AmitDiwan

Updated on 05-Nov-2019 08:10:12

200 Views

The UInt16.MaxValue field in C# represents the maximum value of the 16-bit unsigned integer.SyntaxFollowing is the syntax −public const ushort MaxValue = 65535;ExampleLet us now see an example to implement the UInt16.MaxValue field −using System; public class Demo {    public static void Main(){       ushort val1 = ... Read More

UInt16.GetTypeCode() Method in C# with Examples

AmitDiwan

AmitDiwan

Updated on 05-Nov-2019 08:04:27

59 Views

The UInt16.GetTypeCode() method in C# is used to return the TypeCode for value type UInt16.SyntaxFollowing is the syntax −public TypeCode GetTypeCode ();ExampleLet us now see an example to implement the UInt16.GetTypeCode() method −using System; public class Demo {    public static void Main(){       ushort val1 = 55; ... Read More

UInt16.GetHashCode() Method in C# with Examples

AmitDiwan

AmitDiwan

Updated on 05-Nov-2019 07:59:29

68 Views

The UInt16.GetHashCode() method in C# is used to get the HashCode for the current UInt16 instance.SyntaxFollowing is the syntax −public override int GetHashCode ();ExampleLet us now see an example to implement the UInt16.GetHashCode() method −using System; public class Demo {    public static void Main(){       ushort val1 ... Read More

Tuple Class in C#

AmitDiwan

AmitDiwan

Updated on 05-Nov-2019 07:57:04

73 Views

The Tuple class represents a 2-tuple, which is called pair. A tuple is a data structure that has a sequence of elements.It is used in −Easier access to a data set.Easier manipulation of a data set.To represent a single set of data.To return multiple values from a methodTo pass multiple ... Read More

Advertisements