Articles on Trending Technologies

Technical articles with clear explanations and examples

The equivalent of SQL Server function SCOPE_IDENTITY() in MySQL?

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

The equivalent of SQL Server function SCOPE_IDENTITY() is equal to LAST_INSERT_ID() in MySQL. The syntax is as follows:SELECT LAST_INSERT_ID().This returns the id of last inserted record.Here, I am going to create a table with primary key column. The following is the demo of last_insert_id().First, let us create two tables. The query to create the first table table is as follows:mysql> create table TestOnLastInsertIdDemo    -> (    -> StudentId int NOT NULL AUTO_INCREMENT,    -> PRIMARY KEY(StudentId)    -> ); Query OK, 0 rows affected (0.95 sec)Now creating the second table. The query is as follows:mysql> create table TestOnLastInsertIdDemo2   ...

Read More

Create date from day, month, year fields in MySQL?

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

You can use in-built function STR_TO_DATE() from MySQL. The syntax is as follows −SELECT STR_TO_DATE(CONCAT(yourYearColumName, '-', LPAD(yourMonthColumName, 2, '00'), '-', LPAD(yourDayColumName, 2, '00')), '%Y-%m-%d') 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 DateCreateDemo    −> (    −> `Day` varchar(2),    −> `Month` varchar(2),    −> `Year` varchar(4)    −> ); Query OK, 0 rows affected (1.68 sec)Insert values for all fields using insert command. The query is as follows −mysql> insert into DateCreateDemo values('15', '12', '2018'); Query OK, 1 row affected (0.09 ...

Read More

Do we need to be certified in order to teach quantitative aptitude for SAT (in India)?

Divya Agarwal
Divya Agarwal
Updated on 30-Jul-2019 139 Views

There is no certification nor one required to teach Quantitative aptitude for SAT. The faculty should have the required qualification and experience though.

Read More

How can I add a new column which counts the number of rows as serial number in MySQL?

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

To add a new column that counts the number of rows as serial number, you can use the global variable in select statement.Let us create a table. The query to create a table is as follows:mysql> create table addColumnToCountAsSerialNumber    -> (    -> Id int,    -> Name varchar(20),    -> Age int,    -> Salary int    -> ); Query OK, 0 rows affected (0.80 sec)Insert some records in the table using insert command. The query is as follows:mysql> insert into addColumnToCountAsSerialNumber values(10, 'John', 23, 8576); Query OK, 1 row affected (0.10 sec) mysql> insert into addColumnToCountAsSerialNumber values(12, ...

Read More

What is the meaning of the shloka 'Guru Bramha Guru Vishnu'?

Ridhi Arora
Ridhi Arora
Updated on 30-Jul-2019 65K+ Views

In Sanskrit, Guru word is made up of two root words Gu and Ru. Gu means darkness, and Ru means remover. Thus, guru stands for the teacher who is the remover of darkness and is the harbinger of enlightenment.What is the Guru Brahma Mantra as?The auspicious mantra recited an chanted on teacher’s day and Guru Purnima is "Guru Brahma, Guru Vishnu, Guru Devo Maheshwara; Guru Sakshat Param Brahma, Tasmai Shri Guravay Namah".Meaning of Guru Brahma MantraGuru Brahma - Guru is Brahma, who is the Lord of Creation, also called as Generator, Guru Vishnu means Guru is Vishnu (Vishnu is the ...

Read More

MySQL alias for SELECT * columns?

Rishi Rathor
Rishi Rathor
Updated on 30-Jul-2019 441 Views

MySQL alias cannot be used with *. However, it can be used for individual column. The syntax is as follows −select anyaliasName.yourColumnName1 as anyaliasName1, anyaliasName.yourColumnName2 as anyaliasName2, anyaliasName.yourColumnName3 as anyaliasName3, anyaliasName.yourColumnName4 as anyaliasName4, . . . . N from yourTableName as anyaliasName;MySQL alias is a variable of table that can be used to access the column name of that particular table. To understand the above syntax, let us create a table.The query to create a table is as follows −mysql> create table TableAliasDemo    −> (    −> Id int,    −> Name varchar(100),    −> Age int    −> ...

Read More

Android image scale animation relative to center point?

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

This example demonstrate about Android image scale animation relative to center point.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.         In the above code, we have taken button to show image scaling animation(Zoom animation).Step 3 − Add the following code to src/MainActivity.javapackage com.example.andy.myapplication; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.view.animation.Animation; import android.view.animation.ScaleAnimation; import android.view.animation.TranslateAnimation; import android.widget.Button; import android.widget.ImageView; import android.widget.LinearLayout; public class MainActivity extends AppCompatActivity {   ...

Read More

Is MySQL LIMIT applied before or after ORDER BY?

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

The MySQL LIMIT is applied after ORDER BY. Let us check the limit condition. Firstly, we will create a table −mysql> create table LimitAfterOrderBy    −> (    −> Id int,    −> Name varchar(100)    −> ); Query OK, 0 rows affected (0.50 sec)Insert some records in the table using insert command. The query is as follows −mysql> insert into LimitAfterOrderBy values(101, 'John'); Query OK, 1 row affected (0.18 sec) mysql> insert into LimitAfterOrderBy values(102, 'Carol'); Query OK, 1 row affected (0.15 sec) mysql> insert into LimitAfterOrderBy values(103, 'Bob'); Query OK, 1 row affected (0.21 sec) ...

Read More

What is The Prelude all about?

Ridhi Arora
Ridhi Arora
Updated on 30-Jul-2019 1K+ Views

The Prelude is a long poem by William Wordsworth compiled into fourteen books. All these books trace his spiritual growth with the subtitle of the poem itself as its the theme, which is the growth of the poet's mind.Justification of the TitleThe title stands justified as Wordsworth describes how Nature began its mysterious work in his conscious and subconscious mind. He is convinced that there are hidden forces in Nature impacting him inadvertently right from the time he was a young boy and he thus, recounts a few incidents and comments upon their significance in shaping up his mind. The ...

Read More

Insert the results of a MySQL select? Is it possible?

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

You do not need to use values whenever you insert the results of a select. To insert the results of select, let us first create two tables.The first table query is as follows −< FirstTableDemo> mysql> create table FirstTableDemo    −> (    −> StudentId int,    −> StudentName varchar(100)    −> ); Query OK, 0 rows affected (0.41 sec)Now create second table and after that insert the second table records in the first table using INSERT SELECT command.The query to create the second table − mysql> create table SecondTableDemo    −> (    −> Id int,    −> ...

Read More
Showing 60121–60130 of 61,297 articles
Advertisements