1.can we set the more than 1 primary keys for a table?
2.please give me the difference between Cluster Index and
non-Clustered Index
3.can we use query like this "Select * from Table1,Table2;"

Answer Posted / manub22

1.There cannot be more than 1 Primary Keys for a given table?

2.Difference between Cluster Index and non-Clustered Index, check this link: http://sqlwithmanoj.com/2011/03/02/clustered-vs-nonclustered-indexes-and-data-sorting/

3.Yes, we use query like this "Select * from Table1, Table2;". This will give a Cross Join (or cartesian-product) results from both the tables.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a primary key?

548


How do I start sql server 2017?

537


How do I repair damaged sql server mdf file database? In previous day my mdf file has got damage due to unknown reasons then I used dbcc chekcdb command but it failed, MDF file is important for me, I don’ know that how to get back mdf file data. Please anyone suggest me?

1309


What is an expression in ms sql server?

575


What are different types of statement?

532






This question asked during interview, 2) At the end of each month, a new table is created for each bank that contains monthly metrics consolidated at the account level. The table naming convention is bankX_YYYYMM where X represents the numeric designation of the bank and YYYYMM indicates the 4 digit year and 2 digit month. The tables contain the following fields: name data type description account text account number registered boolean indicates whether the account is registered num_trans integer number of transactions made during the time period spend numeric(9,2) total spend during the time period a) Write a SQL query that will display the total number of transactions and total spend for "Bank1" during the 4th quarter of 2009. b) Write a SQL query that will display the total number of transactions and total spend at "Bank1" and "Bank2", broken out by registered vs. non-registered accounts, during January 2010 not sure what is correct answer and how to solve?

2021


Where are stored procedures in sql server?

574


can you implement data mining in SSRS?

115


What do you understand by user-defined function in the sql server and explain the steps to create and execute a user-defined function in the sql server?

532


What is ms sql server triggers?

544


What do you understand by a stored procedure?

620


Tell me when is the update_statistics command used?

521


What is a benefit of using an after insert trigger over using a before insert trigger?

526


How can you fetch alternate records from a table?

555


How to download and install the scaled-down database adventureworkslt?

615