Articles on Trending Technologies

Technical articles with clear explanations and examples

MySQL - How to count all rows per table in one query?

Ankith Reddy
Ankith Reddy
Updated on 30-Jul-2019 391 Views

You can count all rows per table with the help of aggregate function count (TABLE_ROWS) from informatio_schema.tables. The syntax is as follows −SELECT table_name, TABLE_ROWS FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'yourDatabaseName';Now you can apply the above syntax to get all rows per table. The query is as follows −mysql> SELECT table_name, TABLE_ROWS FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'business';Here is the output −+------------------------------------------------------------------+------------+ | TABLE_NAME                                                       | TABLE_ROWS | +------------------------------------------------------------------+------------+ | accentsearchdemo       ...

Read More

Compare DATE string with string from MySQL DATETIME field?

Vrundesha Joshi
Vrundesha Joshi
Updated on 30-Jul-2019 2K+ Views

You can compare DATE string with string from DATETIME field with the help of DATE() function in MySQL.The syntax is as follows −select *from yourTableName where DATE(yourColumnName) = ’anyDateString’;To understand the above syntax, let us create a table and set some datetime values in the table. The query to create a table −mysql> create table DateTimeDemo −> ( −> ArrivalTime datetime −> ); Query OK, 0 rows affected (0.61 sec)Let us insert some records in the table with the help of insert command. The following is the query to insert records ...

Read More

How to store Query Result in a variable using MySQL?

Anvi Jain
Anvi Jain
Updated on 30-Jul-2019 9K+ Views

To store query result in a variable with MySQL, use the SET command. The syntax is as follows −SET @anyVariableName = ( yourQuery);To understand the above concept, let us create a table. The following is the query to create a table −mysql> create table QueryResultDemo    −> (    −> Price int    −> ); Query OK, 0 rows affected (0.59 sec)Now let us insert some records into the table. The following is the query to insert records −mysql> insert into QueryResultDemo values(100); Query OK, 1 row affected (0.17 sec) mysql> insert into QueryResultDemo values(20); Query OK, 1 row ...

Read More

Do they have the word "dictionary" in the dictionary?

Jaya P
Jaya P
Updated on 30-Jul-2019 1K+ Views

Yes. We can find the word dictionary in a dictionary. When I referred to the Oxford Dictionary, I came across the following meaning.Dictionary: A book or electronic resource that lists the words of a language (typically in alphabetical order) and gives their meaning, or gives the equivalent words in a different language, often also providing information about pronunciation, origin, and usage.Usage:-- ‘I'll look up 'love' in the dictionary’-- ‘the website gives access to an online dictionary’

Read More

MySQL - CAST DECIMAL to INT?

George John
George John
Updated on 30-Jul-2019 6K+ Views

Cast DECIMAL to INT with the help of FLOOR() function. The syntax is as follows −SELECT FLOOR(yourColumnName) from yourTableName where condition;Let us first create a table. The following is the query to create a table.mysql> create table DecimalToIntDemo -> ( -> Amount DECIMAL(3, 1) -> ); Query OK, 0 rows affected (0.88 sec)Now you can insert records into the table with the help of insert command. The query is as follows −mysql> insert into DecimalToIntDemo values(12.5); Query OK, 1 row affected (0.23 sec) mysql> insert into DecimalToIntDemo values(50.4); Query OK, 1 ...

Read More

Why is Sanskrit known as the mother of all languages?

Knowledge base
Knowledge base
Updated on 30-Jul-2019 6K+ Views

Sanskrit is the Holy and Divine language of India, written in Devanagari script which is also known for its clarity and beauty. Sanskrit belongs to the Indo-European languages family. The meaning of the word "Sanskrit" is refined, decorated and produced in perfect form. This is the oldest language ever attested on Earth.Covers A Larger PrecinctThough not for all the languages, Sanskrit is surely the mother of many languages, especially languages spoken in Northern India. Even many words from Dravidian languages are derived from Sanskrit. Almost all of the ancient kinds of literature such as the Vedas, Upanishads, Epics, Shastras, Puranas ...

Read More

Is it necessary to have a responsive website?

yashwanth sitamraju
yashwanth sitamraju
Updated on 30-Jul-2019 187 Views

It won't be surprising for you to hear that mobile phone usage has been increasing day by day. With the launch of modern smartphones hitting the market, much of the population now expect to be able to do many everyday tasks through their mobile phones. As more and more people are using mobile phones over desktop it is clear that the mobile phone is taking over desktops for internet surfing.The fundamental thing for a website is that it should be mobile friendly; it should be designed in such a way that it is equally compatible with mobile phones as well ...

Read More

Get the fields in each constraint in MySQL

Vrundesha Joshi
Vrundesha Joshi
Updated on 30-Jul-2019 180 Views

Let’s say we have a database “business” with number of tables. If you want to Get the fields in each constraint, then use the below query.The below query is to get the fields in each one of those constraints −mysql> select * −> from information_schema.key_column_usage −> where constraint_schema = 'business';The following is the output −+--------------------+-------------------+--------------------------+---------------+--------------+------------------------------+--------------+------------------+-------------------------------+-------------------------+-----------------------+------------------------+ | CONSTRAINT_CATALOG | CONSTRAINT_SCHEMA | CONSTRAINT_NAME          | TABLE_CATALOG | TABLE_SCHEMA | TABLE_NAME                   | COLUMN_NAME | ORDINAL_POSITION  | POSITION_IN_UNIQUE_CONSTRAINT | REFERENCED_TABLE_SCHEMA | REFERENCED_TABLE_NAME | REFERENCED_COLUMN_NAME | +--------------------+-------------------+--------------------------+---------------+--------------+------------------------------+--------------+------------------+-------------------------------+-------------------------+-----------------------+------------------------+ | def         ...

Read More

What are the types of Utilitarian ethics followed in Engineering?

Knowledge base
Knowledge base
Updated on 30-Jul-2019 629 Views

The Utilitarian ethics was proposed by John Stuart. According to this theory, the happiness or pleasure of the greatest number of people in society is considered as the greatest good. According to this philosophy, an action is morally right if its consequences lead to the happiness of people and wrong if they lead to their unhappiness.An example of this can be the removal of the reservation system in education and government jobs, which can really benefit the talent. But this could endanger the minority rights.Following are two main types of Utilitarianism.Act UtilitarianismRule Utilitarianism.Act UtilitarianismThe Act utilitarianism focuses on each situation ...

Read More

What is the standard body for conventions of research writing?

Ridhi Arora
Ridhi Arora
Updated on 30-Jul-2019 305 Views

MLA (Modern Language Association) is a body that assigns rules and regulations for research paper writing. MLA is popular worldwide and assigns various rules on Selecting a topic, compiling a working bibliography, outlining and writing drafts (to name a few).Selecting A TopicIn order to select a topic, different instructors and different courses offer widely varying degrees of freedom to students selecting topics for research papers. The instructor of a course in a specific discipline may supply a list of topics from which to choose or any, more generally, require that the paper relates to an important aspect of the course. MLA ...

Read More
Showing 60621–60630 of 61,297 articles
Advertisements