AmitDiwan has Published 10744 Articles

Updating a MySQL table row column by appending a value from user defined variable?

AmitDiwan

AmitDiwan

Updated on 05-Nov-2019 09:28:27

370 Views

Let us first create a table −mysql> create table DemoTable1349    -> (    -> ProductId int NOT NULL AUTO_INCREMENT PRIMARY KEY,    -> ProductPrice int    -> ); Query OK, 0 rows affected (0.71 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1349(ProductPrice) values(7644); Query ... Read More

DateTime.ToLocalTime() Method in C#

AmitDiwan

AmitDiwan

Updated on 05-Nov-2019 09:27:06

415 Views

The DateTime.ToLocalTime() method in C# is used to convert the value of the current DateTime object to local time.SyntaxFollowing is the syntax −public DateTime ToLocalTime ();ExampleLet us now see an example to implement the DateTime.ToLocalTime() method −using System; public class Demo {    public static void Main() {     ... Read More

How to order and select query with conditions in MySQL?

AmitDiwan

AmitDiwan

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

241 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

578 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

296 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

499 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

421 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

3K+ 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

384 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

94 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

Advertisements