Ankith Reddy has Published 996 Articles

Cable Internet

Ankith Reddy

Ankith Reddy

Updated on 30-Jul-2019 22:30:23

3K+ Views

Cable Internet is a category of broadband Internet access that uses the infrastructure of cable TV network to provide Internet services. Cable Internet provides connectivity from the Internet service provider (ISP) to the end users in a similar manner as digital subscriber line (DSL) and fiber-to-the-home (FTTH). System Layout ... Read More

ALTER TABLE to add a composite primary key in MySQL?

Ankith Reddy

Ankith Reddy

Updated on 30-Jul-2019 22:30:23

1K+ Views

To add composite primary key, use the ALTER command. Let us first create a demo table The query to create a table. mysql> create table CompositePrimaryKey -> ( -> Id int, -> StudentName varchar(100), -> Age int ... Read More

How to convert MySQL datetime to Unix timestamp?

Ankith Reddy

Ankith Reddy

Updated on 30-Jul-2019 22:30:23

16K+ Views

We can convert MySQL date and time to Unix Timestamp with the help of function UNIX_TIMESTAMP(). The following is the query. mysql> SELECT UNIX_TIMESTAMP(STR_TO_DATE('Oct 19 2018 10:00PM', '%M %d %Y %h:%i%p')); After running the above query we will not get the output in date format as shown in ... Read More

Difference between String and StringBuilder in C#

Ankith Reddy

Ankith Reddy

Updated on 30-Jul-2019 22:30:23

2K+ Views

Strings in C# String is immutable in C# that would mean you couldn’t modify it after it is created. It creates a new object of string type in memory if you will perform any operation. string str1 = "Welcome!"; // creates a new string instance str1 += "Hello"; str1 ... Read More

Is it possible to have a function-based index in MySQL?

Ankith Reddy

Ankith Reddy

Updated on 30-Jul-2019 22:30:23

253 Views

Function-based index wasn’t possible in MySQL versions below 5.6. Firstly, to create function-based index in MySQL, we will create a table. mysql> create table FunctionIndexDemo - > ( - > FirstName varchar(100) - > ); Query OK, 0 rows affected ... Read More

MySQL's DESCRIBE command?

Ankith Reddy

Ankith Reddy

Updated on 30-Jul-2019 22:30:23

9K+ Views

The MySQL’s DESCRIBE or DESC both are equivalent. The DESC is the short form of DESCRIBE command and used to dipslay the information about a table like column names and constraints on column name. The DESCRIBE command is equivalent to the following command − SHOW columns from yourTableName command. ... Read More

How to create a MySQL table with MyISAM engine table?

Ankith Reddy

Ankith Reddy

Updated on 30-Jul-2019 22:30:23

3K+ Views

To create a MySQL table with MyISAM engine, we can use ENGINE command. Let us first create a table using CREATE command. mysql> create table StudentRecordWithMyISAM -> ( -> Id int, -> StudentName varchar(100), -> StudentAge int ... Read More

How do I modify a MySQL column to allow NULL?

Ankith Reddy

Ankith Reddy

Updated on 30-Jul-2019 22:30:23

5K+ Views

For our example, let us create a table with NOT NULL constraint. After that, we will modify a column to allow NULL. The following is the query to create a table with NOT NULL constraint. mysql> create table AllowNullDemo -> ( -> id ... Read More

How to get the size of the tables of a MySQL database?

Ankith Reddy

Ankith Reddy

Updated on 30-Jul-2019 22:30:23

399 Views

To get the size of the tables of a MySQL database, you can use the “information_schema.tables”. Here is the syntax to know the size of all tables. SELECT TABLE_NAME AS `ALLTABLESNAME`, ROUND((DATA_LENGTH + INDEX_LENGTH) / 1024 / 1024) AS `TABLESIZEIN(MB)` FROM information_schema.TABLES WHERE TABLE_SCHEMA = "yourDatabaseName" ... Read More

Why doesn't MySQL support millisecond / microsecond precision?

Ankith Reddy

Ankith Reddy

Updated on 30-Jul-2019 22:30:23

623 Views

The millisecond/ microsecond precision wasn’t supported in previous versions like 5.6.4. But now MySQL supports millisecond/ microsecond precision with timestamp, datetime, and time. The official statement. “MySQL now supports fractional seconds for TIME, DATETIME, and TIMESTAMP values, with up to microsecond precision”. You can check the MySQL version on your ... Read More

Advertisements