To add more than 1 column with ALTER table command, you can use MODIFY column command. The syntax is as follows −alter table yourTableName modify column yourColumnName1 dataType, modify column yourColumnName2 dataType, . . . modify column yourColumnNameN dataTypeTo understand the above syntax, let us create a table. The following is the query −mysql> create table AddColumn −> ( −> StudentID int, −> StudentName varchar(200) −> ); Query OK, 0 rows affected (0.49 sec)Above we have two columns in the table “AddColumn”. In this we will see how to modify more than one column datatype −mysql> ... Read More
You can declare a variable using @anyVariablename which is a session variable. To create a session variable, you need to use SET command.The syntax is as followsSET @anyVariableName:=anyValue;You can declare a local variable using DECLARE command. The syntax is as followsDECLARE yourVariableName datatypeYou can set the default value at the time of creating a variable. The syntax is as followsDECLARE yourVariableName datatype default ‘yourValue’Here is the demo of session variable. To understand it, let us create a table.The query to create a table is as followsmysql> create table SessionVariableDemo -> ( -> EmployeeId varchar(10), -> EmployeeName varchar(30), ... Read More
To detect current device with iOS/Swift we can use UserInterfaceIdiom. It is an enum in swift, which tells which device is being used.The interface idiom provides multiple values in it’s enum which are.case unspecified @available(iOS 3.2, *) case phone // iPhone and iPod touch style UI @available(iOS 3.2, *) case pad // iPad style UI @available(iOS 9.0, *) case tv // Apple TV style UI @available(iOS 9.0, *) case carPlay // CarPlay style UIIn swift interfaceIdiom can be used in the following way:print(UIDevice.current.userInterfaceIdiom) if UIDevice.current.userInterfaceIdiom == .phone { print("running on iPhone") }When we run the above code ... Read More
The internet is the most craziest place we have ever witnessed because there are content creators who put all their sweat and blood to create the best content but hardly get the desired response from the audience out there. On the other hand, some content despite being substandard, make people go gaga about it within minutes and hours. This made me ponder upon the key factor involved in it. What makes any content whether good, better or best go viral.TastemakersThey are influential people who introduce content they want to make viral to common people and get the content in limelight. ... Read More
The MySQL delimiter occurs when you are using a pipe delimiter(|) with semicolon (;) and using MySQL version lower than 8.0.12.MySQL treats the pipe (|) as one delimiter and semicolon (;) is another delimiter. Therefore, do not confuse the MySQL delimiter with pipe as well as semicolon.Note: Here, we are using MySQL version 8.0.12. The pipe delimiter works fine with semicolon. If you are using version lower than 8.0.12, then this leads to a delimiter error.Here is the working of MySQL delimiter:mysql> delimiter |; mysql> create procedure getSumOfTwoNumbers() -> begin -> select 2+3 as ... Read More
To rearrange the MySQL columns, check the column arrangement with the help of show create command. The syntax is as follows −show create table yourTableName;The syntax to rearrange the MySQL columns is as follows −alter table yourTableName change column yourColumnName yourColumnName dataType firstFor the same purpose, you can use the after keyword. The syntax is as follows −alter table yourTableName change column yourColumnName yourColumnName dataType after yourSpecificColumnName;Let us first check the column arrangement for the already created table “AddColumn” −mysql> show create table AddColumn; The following is the output −+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Table | Create Table ... Read More
To insert decimal into MySQL, you can use DECIMAL() function from MySQL. The syntax is as followsyourColumnName DECIMAL(TotalDigit, DigitAfterDecimalPoint);To understand the above syntax, let us create a table. The query to create a table is as followsmysql> create table DecimalInsert -> ( -> Id int, -> Name varchar(100), -> Amount DECIMAL(4, 2) -> ); Query OK, 0 rows affected (0.65 sec)Insert the decimal value using insert command. The query is as followsmysql> insert into DecimalInsert values(1, 'John', 12.4); Query OK, 1 row affected (0.15 sec) mysql> insert into DecimalInsert values(2, 'Carol', 12.34); Query OK, ... Read More
What are the basic aspects to assess the strengths of the marketing team? What are you aiming to do- inspiring them or motivating them? The act of actually stimulating a person’s mind to think and perform the way you want them to will define ‘Motivation’. However, the act of doing and achieving something because they want to achieve it is ‘Inspiration’.As a Head of Marketing, I always look at inspiring people to do better in their jobs. This holds true for individuals in every sphere of life or business. To achieve is to inspire and to inspire, is to see ... Read More
What? Anything big can’t be in India! Well, apart from being one of the tops in some shameful aspects like population, poverty, filth, crime, etc. there are a few areas where we excel as well. Like this one. Yes, the largest cellphone factory is located in Noida, Uttar Pradesh. Recently inaugurated by PM Modi, the factory belongs to the smartphone giant Samsung. This establishment will have the capacity of manufacturing 120 million phones a year including low-end smartphones to flagship phones. About 10 million phones will be fabricated per month and out of that 70 percent will be earmarked for ... Read More
The ezmlm_hash() function calculates the hash value needed when keeping EZMLM mailing lists in a MySQL database.Syntaxezmlm_hash(addr);Parametersaddr − The email address being hashed.ReturnThe ezmlm_hash() function returns the hash value of addr.ExampleThe following is an example −
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP