Articles on Trending Technologies

Technical articles with clear explanations and examples

What is the syntax for defining the data structure in C++?

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

C++ Programming is basically an enhanced version of C programming language and it is used for “Object-oriented Programming”C++ was developed by Bjarne Stroustrup who did the first development of the language as his first Ph.D. project.He had begun this project because there were no existing programming languages used for large-scale projects.It was initially called as “C with classes”The programming language was first standardized in 1998 and was again issued in 2003, 2007 and 2011.C++ is maintained by ISO, a large standard committee.C++ is widely and commonly used in embedded systems and software engineering.C++ has influenced languages like PHP and C-sharp.Data ...

Read More

How to Reset MySQL AutoIncrement using a MAX value from another table?

Chandu yadav
Chandu yadav
Updated on 30-Jul-2019 1K+ Views

You can use prepare statement to Reset MySQL AutoIncrement using a MAX value from another table.The following is the syntax −set @anyVariableName1=(select MAX(yourColumnName) from yourTableName1); SET @anyVariableName2 = CONCAT('ALTER TABLE yourTableName2 AUTO_INCREMENT=', @anyVariableName1); PREPARE yourStatementName FROM @anyVariableName2; execute yourStatementName;The above syntax will reset MySQL auto_increment using a maximum value from another table. To understand the above syntax, let us create two tables. The first table will contain the records and the second table will use the maximum value from the first table and use for an auto_increment property.The query to create a table is as follows −mysql> create table FirstTableMaxValue ...

Read More

Insert datetime into another datetime field in MySQL?

Anvi Jain
Anvi Jain
Updated on 30-Jul-2019 540 Views

You can achieve this with the help of update command. To understand the method, let us create a table. The query to create a table is as follows −mysql> create table AddDateTimeWithOther −> ( −> Id int, −> IssueDate datetime, −> DueDate datetime −> ); Query OK, 0 rows affected (0.69 sec)Insert some records in the table with insert statement. The query is as follows −mysql> insert into AddDateTimeWithOther values(100, now(), date_add(now(), interval -3 year)); Query OK, 1 row affected (0.13 sec) mysql> insert ...

Read More

What is the difference between scramjet and ramjet engines?

Shanmukh Pasumarthy
Shanmukh Pasumarthy
Updated on 30-Jul-2019 1K+ Views

Both scramjet and Ramjet are types of jet engines. A ramjet is an air breathing jet engine which is usually associated with supersonic transport. Ramjets can start at supersonic speeds only, so as a result they cannot be started at zero velocity and cannot produce thrust as there is a lack of airspeed.Hence assisted take off flights or rockets are needed to or accelerate it to a supersonic speed from which it starts producing thrust. This makes ramjet engine to be efficient only at supersonic speeds as it can accelerate to speeds of about Mach 6. Ramjet has revolutionized Rocket ...

Read More

What are Guerrilla Marketing Strategies?

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

The concept of Guerrilla marketing was created by Jay Conrad Levinson. Traditional marketing involves advertising methods such as advertising on television, radio, print, and mail. Online marketing or Digital marketing is the type of advertising which we see today on websites, YouTube videos, blogs, etc. Whereas, Guerrilla Marketing is an inexpensive method that focuses more on reach rather than frequency. This style of marketing is effective for small businesses to advertise their product and services. One needs to have imagination, energy and time for this kind of advertising.Give an ImpactThis kind of advertising engages the customers with the product and ...

Read More

Select multiple sums with MySQL query and display them in separate columns?

Ankith Reddy
Ankith Reddy
Updated on 30-Jul-2019 1K+ Views

To select multiple sum columns with MySQL query and display them in separate columns, you need to use CASE statement. The syntax is as follows:SELECT SUM( CASE WHEN yourColumnName1=’yourValue1’ THEN yourColumnName2 END ) AS yourSeparateColumnName1, SUM( CASE WHEN yourColumnName1=’yourValue2’ THEN yourColumnName2 END ) AS yourSeparateColumnName2, SUM( CASE WHEN yourColumnName1=’yourValue3’ THEN yourColumnName2 END ) AS yourSeparateColumnName3, . . . N FROM yourTableName;To understand the above syntax, let us create a table. The query to create a table is as follows:mysql> create table selectMultipleSumDemo    -> (    -> Id int NOT NULL AUTO_INCREMENT,    -> PlayerName varchar(20),    -> PlayerScore int, ...

Read More

How to select record from last 6 months in a news table using MySQL?

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

To select the last 6 months records from news table, use the date_sub() function from MySQL since news records are arranged according to date.The syntax is as follows −select *from yourTableName where yourDateTimeColumnName >= date_sub(now(), interval 6 month);To understand the above concept, let us first create a NEWS table with only NEWS ID and the date on which it published −mysql> create table Newstable -> ( -> NewsId int, -> NewsDatetime datetime -> ); Query OK, 0 rows affected (0.66 sec)Insert records in the table using insert command. ...

Read More

Can MySQL automatically store timestamp in a row?

Chandu yadav
Chandu yadav
Updated on 30-Jul-2019 3K+ Views

Yes, you can achieve this in the following two ways.First Approach At the time of creation of a table.Second Approach At the time of writing query.The syntax is as follows.CREATE TABLE yourTableName ( yourDateTimeColumnName datetime default current_timestamp );You can use alter command.The syntax is as follows.ALTER TABLE yourTableName ADD yourColumnName datetime DEFAULT CURRENT_TIMESTAMP;Implement both the syntaxes now.The first approach is as follows.mysql> create table CurrentTimeStampDemo -> ( -> CreationDate datetime default current_timestamp -> ); Query OK, 0 rows affected (0.61 sec)If you do not pass any parameter for the column ‘CreationDate’, MySQL by default stores the current timestamp.Insert record in ...

Read More

ORDER BY alphabet first then follow by number in MySQL?

Arjun Thakur
Arjun Thakur
Updated on 30-Jul-2019 1K+ Views

You need to use regular expression with ORDER BY clause. The syntax is as follows:SELECT *FROM yourTableName ORDER BY IF(yourColumnName RLIKE '^[a-z]', 1, 2), yourColumnName;To understand the above syntax, let us create a table. The query to create a table is as follows:mysql> create table AlphabetFirstThenNumberDemo    -> (    -> Id int NOT NULL AUTO_INCREMENT,    -> Name varchar(20),    -> PRIMARY KEY(Id)    -> ); Query OK, 0 rows affected (0.95 sec)Insert some records in the table using insert command. The query is as follows:mysql> insert into AlphabetFirstThenNumberDemo(Name) values('John'); Query OK, 1 row affected (0.37 sec) mysql> insert ...

Read More

Sample questions for ITIL Foundation Course

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

Information Technology Infrastructure Library (ITIL) is the framework that is designed to standardize the planning, selection, and delivery of IT services to a business. The goal of ITIL is to improve efficiency and also achieve predictable goals or targets. An ITIL enables an IT professional to be a business service partner, not just back-end support.ITIL Foundation ExaminationIt is a closed book examination.It consists of 40 questions.Each question has multiple choices.One mark is allotted for the correct answer.The duration of the exam is one hour.One has to score 65% of the marks to pass the examination i.e minimum 26 questions must ...

Read More
Showing 60481–60490 of 61,297 articles
Advertisements