2) Consider a Table name A which has below records
ID
---
5
5
5
5
5
Consider another table B which has below records
ID
--
5
5
5
5
5
5
5
5
How many rows will be returned by each of the below queries
a) select * from A inner join B on A.id = b.ID
b) select * from A left join B on A.id = b.ID
c) select * from A right join B on A.id = b.ID
1) If a table is having only one identity column how can we insert records into this table? Answer :
Consider table customer which is created with below statement in sql server
create table customer
( id int identity(1,1))
Now to insert records into this table we can do it in two ways:
a) INSERT INTO customer DEFAULT VALUES
b)
SET IDENTITY_INSERT dbo.customer ON
INSERT INTO customer (id)
values (1),(2),(3)