SQL FAQ |
Display all tables name in SQL Server? |
Single Query Update salary with condition |
Which TCP/IP port does the SQl Server is running? SQL Server runs on port 1433. It can be change from the Network Utility TCP/IP then enter into Properties à Port Number. Both on client and the Server. |
What’s the maximum size of a row? 8060 bytes. Don’t be surprised with questions like ‘what is the maximum number of columns per table’. 1024 columns per table. Check out SQL Server books online for the page titled: "Maximum Capacity Specifications". |
Find the Duplicate Values in a table |
Delete duplicate Record WITH deldup as (Select row_number() over |
How to Findout Nth highest Salary |
Example for Group by Having Select Depart,Sum(salary) from Employee group by Depart having sum(salary) >= 1000 |
To copy the whole tables with data |
Copy structure only |
To find total row in a table |
How Rename the table |
How to add new Data type for Database |
To find out the login that is mapped to the built-in “dbo” user |
To find out old db_owner role |
To get the NULL passwords Username |
To Find out the User tables in a Database |
To Get The Column Name,DataType, And Length of columns select column_name, data_type, character_maximum_length from information_schema.columns |