http://javarevisited.blogspot.com/2012/12/create-auto-incremented-identity-column-oracle-sequence-sql-server-mysql-sybase.html
By the way this SQL article is continuation of my earlier post on SQL and database like difference between truncate and delete in SQL and Finding second highest salary in MySQL and SQL Server. Auto incremented Id or sequence in Sybase Sybase Adaptive Server or ASE also supports IDENTITY column but with slightly different way than SQL Server 2005 or 2008 e.g
http://www.xaprb.com/blog/2005/12/06/find-missing-numbers-in-a-sequence-with-sql/
Exclusion joins Possibly the most efficient technique, depending upon the application, is to use an exclusion join against a list of all legal values (for example, an integers table). Here is the result: start 5 11 21 Find ranges of missing values with subqueries The above query identifies the start of ranges of missing numbers, but not the end
Using DISTINCT in SQL to eliminate duplicate rows
http://searchsqlserver.techtarget.com/feature/Using-DISTINCT-in-SQL-to-eliminate-duplicate-rows
Caution: For database systems that include a graphical interface, you can usually request that the result set of a query be displayed in an up-datable grid of rows and columns. For example, if there are 20 people from Bellevue and 7 people from Kent and 14 people from Seattle, the result set displays 20 occurrences of Bellevue, 7 occurrences of Kent, and 14 occurrences of Seattle
How to change SQL Server collation - Database Administrators Stack Exchange
http://dba.stackexchange.com/questions/337/how-to-change-sql-server-collation
Setting and Changing the Server Collation - SQL Server 2008 Make sure you have all the information or scripts needed to re-create your user databases and all the objects in them. Rebuild the master database specifying the new collation in the SQLCOLLATION property of the setup command Create all the databases and all the objects in them
http://blog.sqlauthority.com/2007/03/01/sql-server-delete-duplicate-records-rows/
select * from mytable union select * from mytable, thsi query returns the exact records, and i guess we can use this data to build a new table or replacing the previous one. I need to get rid of the duplications, meaning that when names are shown more than once for a given month and year, I only want one of the duplicated intervention records to show up
http://javarevisited.blogspot.com/2012/12/how-to-find-second-highest-or-maximum-salary-sql.html
Second maximum salary using LIMIT keyword of MYSQL database LIMIT keyword of MySQL database is little bit similar with TOP keyword of SQL Server database and allows to take only certain rows from result set. SELECT TOP 1 salary FROM ( SELECT TOP 3 salary FROM employees ORDER BY salary DESC) AS emp ORDER BY salary ASCIs this correct for 3rd highest salary ?? May 28, 2014 at 5:49 AM Anonymous said..
http://blog.sqlauthority.com/2007/01/10/sql-server-query-to-find-number-rows-columns-bytesize-for-each-table-in-the-current-database-find-biggest-table-in-database/
script the source table and then run the script on destination, where you want to create the table, this will create a table with the same name with all the features of the source table. Tha query will give you properties for that table (columns, keys, values, etc.) I want to pull the same properties from a result set that is not already a table
sql - How can I remove duplicate rows? - Stack Overflow
http://stackoverflow.com/questions/18932/how-can-i-remove-duplicate-rows
Automatically SQL SERVER ignore (there is also an option about what to do if there will be a duplicate value: ignore, interrupt or sth) duplicate values. Factors which might favour the hash aggregate approach would be No useful index on the partitioning columns relatively fewer groups with relatively more duplicates in each group In extreme versions of this second case (if there are very few groups with many duplicates in each) one could also consider simply inserting the rows to keep into a new table then TRUNCATE-ing the original and copying them back to minimise logging compared to deleting a very high proportion of the rows
How to find duplicate values in a table. - CodeProject
http://www.codeproject.com/Articles/127725/How-to-find-duplicate-values-in-a-table
License This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL) Share email twitter facebook linkedin reddit google+ About the Author Vivek Johari Technical Lead India I am currently working as a Analyst and have around 7.5 years of experience in database. Related article you may be interested in: How to remove duplicate rows from a table in SQL Server (MS KB article) Also, you can simplify your having clause
How to remove duplicate rows in SQL Server 2005 when no key is present - CodeProject
http://www.codeproject.com/Tips/159984/How-to-remove-duplicate-rows-in-SQL-Server-wh
At my spare time (what ever that actually means) I'm also teaching and consulting on different areas of database management, development and database oriented software design
No comments:
Post a Comment