Derived Table In Sql Server
Derived tables:- Derived tables are the tables which are created on the fly with the help of the Select statement. It is...
2012-04-15
18,014 reads
Derived tables:- Derived tables are the tables which are created on the fly with the help of the Select statement. It is...
2012-04-15
18,014 reads
Pivot Table:- Pivot tables are used to summarize and display the data, specially in case of report data by means...
2012-04-14
39,603 reads
Output Clause:- The SQL SERVER 2005 gives us an Output Clause which gives us the information about each row affected by the...
2012-01-22
2,193 reads
Common table expression (CTE):- Common table expression or CTE can be described as the temporary, named record set return by...
2012-01-17
4,992 reads
Table variable:- SQL Server provides an variable known as table variable which is used to store data in a similar way as we...
2012-01-07
9,432 reads
Local temporary table:- Local temporary table is created in the tempdb and it is visible to the current user's session...
2012-01-07
8,729 reads
Global temporary table:- Global temporary table is created in the tempdb and it is visible to all other sessions as well. Global...
2012-01-07
48,479 reads
To rename a column in a SQL Table following command can be reused:
SP_RENAME 'old table name', 'New table name'
For example,...
2012-01-02
1,855 reads
To change the collation of an database following commands can be used:
ALTER DATABASE [database name] SET SINGLE_USER WITH ROLLBACK IMMEDIATE
ALTER DATABASE [database name] COLLATE Newcollation
ALTER DATABASE [database name] SET MULTI_USER
For example , suppose if the name...
2012-01-02
2,346 reads
Introduction
Triggers can be defined as the database objects which perform some action for automatic execution whenever users try to do execute...
2011-11-16
12,911 reads
By Steve Jones
My life has some crazy travel stretches for sure. Between speaking, office visits, customer...
In Part 1, we saw how ‘Vamana’ represents vectors as nodes, connects them with...
I’m excited to announce the release of a new open-source project that fully automates...
Call Cs 08218200233 Gedung Aurum, Jl. Ampera Raya No.37, RT.8/RW.2, Cilandak Tim., Ps. Minggu,...
Call CS 08218200203 Mal & Apartemen Ambasador, Jl. Prof. DR. Satrio No.R.18 Lt Dasar,...
There is a table tmp_tab:
CREATE TABLE tmp_tab ( id int, val int );
INSERT INTO tmp_tab VALUES (1, 1), (2, NULL), (3, 3), (4, 4), (5, 5);You want to order the rows ids by the following expression:
ISNULL(val, id) + 1Which of the following queries produces the expected ordering and why? (Select all correct) See possible answers