| Other SQL Server Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| CREATE TABLE [dbo].[HPMS_CompetencyTypes](CompetencyType
varchar(50) )
go
create trigger hpms_create_Insert
on HPMS_CompetencyTypes
for insert
as
if Exists ( select * from [HPMS_CompetencyTypes] where
CompetencyType=(select * from [HPMS_CompetencyTypes]))
begin
Rollback tran
Raiserror ('duplicate value',12,6)
go
insert HPMS_CompetencyTypes (CompetencyType) values ('new')
I'm new to trigger can any one tell me where is the issue.
Please. | | 2 |
| explain different types of jions with examples briefly? | Zensar | 1 |
| What should we do to copy the tables, schema and views from
one SQL Server to another? | | 3 |
| I have a website that allows customers to browse and place
orders for certain products.
I have 2 tables; Customers and Orders. The Customers table
holds the customer records and the Orders table
holds the orders placed by the customer. Both tables are
tied based on the field Cust_ID.
Example of the data is shown below:
Cust_ID Cust_Name Cust_ID Product Amount Order_Date
1001 John Tan 1001 P-5211 $120.00 2/13/2006
1002 Michael Wong 1001 K-1428 $88.90 1/11/2006
1003 Mary Cheong 1003 C-0923 $82.50 1/27/2006
1004 Ahmad Suffian 1003 K-1428 $88.90 2/2/2006
Write a single SQL statement that extracts all purchase
records with the following criteria:
1. Customer names starting with “M” only.
2. Orders placed within the current month only.
3. Amount does not exceed $100.00
The list must be sorted by order date with the latest order
showing on top. | Techno-Solutions | 3 |
| PC(code, model, speed, ram, hd, cd, price)
Find the hard drive sizes that are equal among two or more
PCs.
| APX | 2 |
| how many types of store procedre in sqlserver 2000? | ATI | 2 |
| Which virtual table does a trigger use? | TCS | 5 |
| what is IDE,DMV in sql server? | Value-Labs | 1 |
| How to Debug a Stored Procedure? | Allianz | 4 |
| Differences between functions and stored procedures? | 247Customer | 4 |
| How to delete an attribute from the emp table | | 3 |
| What is the difference between two queries:
1. SELECT * FROM table WHERE 1=1;
2. SELECT * FROM table | HP | 15 |
| What is the difference between temp table and table variable? | Microsoft | 4 |
| what are the problems in logshipping? | | 2 |
| write query for fourth maximum salary from employee table | Mind-Tree | 5 |
| What is the difference Between Sql-server 2000 & 2005 | Value-Labs | 2 |
| Can some one please help with a query which will take only
max value of a column in a join. | | 2 |
| How will oyu test the stored procedure taking two parameters
namely first name and last name returning full name? | | 3 |
| hi,
i have a table called names and field name
select * from names
name
a
b
c
d
i want to display like this
name
a,b,c,d
how it is possible
Regards
Baiju | | 3 |
| i want table name basis on column name. | | 5 |
| |
| For more SQL Server Interview Questions Click Here |