Post Views: 1,321 Here is some important SQL Interview Questions and Answers, these SQL Interview Questions and Answers may be help in your interview round. SQL Interview Questions and Answers What are difference between DELETE & TRUNCATE commands? Delete command removes the rows from a table based on the condition that we can write WHERE clause […]
SQL
Collection of Articles and Posts on SQL,SQL Professional must read these Articles and Posts, these also includes some questions mostly ask by interviewer,
How to get top 3 salary in Sql server?
Difference between char and nvarchar / char and varchar data-type?
Post Views: 857 char[(n)] – It is fixed-length non-Unicode character data with length of n bytes. n must be a value from 1 through 8,000. Storage size is n bytes. The SQL-92 synonym for char is character. nvarchar(n) – Variable-length Unicode character data of n characters. n must be a value from 1 through […]
What are difference between Local temp table and Global temporary table in SQL Server?
Post Views: 1,180 Local Temp Table: Local temp table is created using the # sign and table name. Temp table is created for single user session or duration of sql connection of sql and once the session or connection is closed temp table is dropped. If we are creating the local temp table using the […]
What is Maximum Size of Rows in Sql Server?
Post Views: 770 8060 bytes
What are difference between Primary key Constraint and Unique key Constraint in SQL Server?
Post Views: 728 Unique Key Constraint: Unique key will create column data uniqueness in the table. Unique Key allows null values in the column. Unique key will create non-clustered index by default. You can add any number of unique constraints in to a table. Primary Key Constraint: Primary key will create column data uniqueness in […]
What are difference between the temp table and table variable in SQL Server?
Post Views: 743 Temporary Variables: 1) The temp table can be created using the #sign and table name. — Create Temporary TableCREATE TABLE #Employee (Id INT, Name VARCHAR(50)) –Insert Two rows INSERT INTO #Employee VALUES(1,’Ram’) INSERT INTO # Employee VALUES(2,’Karan’) –Retrieve the records from temp table SELECT * FROM #Employee –DROP Temporary Table query DROP […]
What is clustered and nonclustered index in Sql Server?
Post Views: 710 Clusters Index: Clustered indexes sort and store the data rows in the table or view based on their key values. These are the columns included in the index definition. There can be only one clustered index per table, because the data rows themselves can be sorted in only one order. In SQL […]
What are difference between Group by and Having clause in SQL Server?
Post Views: 785 Group by Clause: The GROUP BY clause is used in SQL for SELECT statement to collecting the data across multiple records and making the group of one or more columns. SELECT Department1, SUM(ProductSales) AS “Total ProductSales” FROM Product_order_details GROUP BY Department1; Having Clause: The having clause is used for only on group rows […]
How to unlock the user without password reset in SQL Server
Post Views: 1,537 SQL Server User Locked How to unlock the user without password reset If any user try to login many times and failed. Sql server 2005 locked account automatically then that user try to login (other than sa for example “testuser1” user) in MS SQL Server and it shows the account be locked. when he try into […]