- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Arjun Thakur has Published 1109 Articles
Arjun Thakur
505 Views
In addition to the modules and packages built in to the standard distribution of Python, large number of packages from third party developers are uploaded to Python package repository called Python Package Index (https://pypi.org/. To install packages from here, pip utility is needed. The pip tool is an independent project, ... Read More
Arjun Thakur
352 Views
First, determine the type of MySQL database i.e. whether its engine is InnoDB or MyISAM. To achieve this, use engine column from the information_schema.columns.tables.The syntax is as follows.SELECT ENGINE FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = ’yourDatabaseName’ AND TABLE_NAME = ’yourTableName’;Here, I have a table with the name ‘StudentInformations’ −mysql> create table ... Read More
Arjun Thakur
8K+ Views
You can count multiple COUNT() for multiple conditions in a single query using GROUP BY.The syntax is as follows -SELECT yourColumnName, COUNT(*) from yourTableName group by yourColumnName;To understand the above syntax, let us first create a table. The query to create a table is as follows.mysql> create table MultipleCountDemo -> ... Read More
Arjun Thakur
400 Views
To auto generate database diagram in MySQL, use MySQL workbench. For this, select the option from database as shown below −Database->Reverse EngineerHere is the snapshot showing the Database tab −After clicking “Database” above, choose the option “Reverse Engineer”. This state the “Reverse Engineer” mode.Clicking above will display the following table ... Read More
Arjun Thakur
319 Views
You can use ENGINE = InnoDB in place of TYPE = InnoDB, since the usage of TYPE became obsolete in MySQL version 5.1.The version we are using for our example is MySQL version 8.0.12. Let us check the MySQL version. The query is as follows −mysql> select version();The following is ... Read More
Arjun Thakur
200 Views
The pyclbr module in Python library extracts information about the functions, classes, and methods defined in a Python module. The information is extracted from the Python source code rather than by importing the module.This module defines readmodule() function that return a dictionary mapping module-level class names to class descriptors. The ... Read More
Arjun Thakur
8K+ Views
You can update field to add value to an existing value with the help of UPDATE and SET command. The syntax is as follows −UPDATE yourTableName SET yourColumnName = yourColumnName+integerValueToAdd WHERE yourCondition;To understand the above syntax, let us create a table. The query to create a table is as follows ... Read More
Arjun Thakur
815 Views
Achieve this using MyISAM Engine. Here is an example of two columns as primary key with auto-increment.Creating a table with two columns as primary key −mysql> create table TwoPrimaryKeyTableDemo -> ( -> Result ENUM('First', 'Second', 'Third', 'Fail') not null, -> StudentId ... Read More
Arjun Thakur
5K+ Views
You can use date_format() to convert varchar to date. The syntax is as follows −SELECT DATE_FORMAT(STR_TO_DATE(yourColumnName, 'yourFormatSpecifier'), 'yourDateFormatSpecifier') as anyVariableName from yourTableName;To understand the above syntax, let us create a table. The query to create a table is as follows −mysql> create table VarcharToDate -> ( -> Id ... Read More
Arjun Thakur
21K+ Views
To run SQL script in MySQL, use the MySQL workbench. First, you need to open MySQL workbench.The snapshot is as follows −Now, File -> Open SQL Script to open the SQL script.Alternatively, use the following shortcut key −Ctrl+Shift+OAfter that an option would be visible for you to choose your .sql ... Read More