Write the first few data records for oracle/db2/sqlserver/sybase/mysql Databases

Source: Internet
Author: User
Tags sybase

Write the first few data records for oracle/db2/sqlserver/sybase/mysql databases. ORACLESELECT * FROM TABLE1 where rownum <= N 2. informix select first n * FROM TABLE1 where 1 = 1 3. DB2 SELECT * ROW_NUMBER () OVER (order by COL1 DESC) as rownum where rownum <= N or select column from table where 1 = 1 fetch first n rows only 4. SQL SERVER SELECT TOP N * FROM TABLE1 where 1 = 1 or SET ROWCOUNT N SELECT * FROM TABLE1 where 1 = 1 SET ROWCOUNT N1 5. sybase set rowcount n select * FROM TABLE1 where 1 = 1 set rowcount N1 Note: Execute set rowcount 0 to cancel ROWCOUNT setting 6. mysql select * FROM TABLE1 where 1 = 1 limit n 7. foxpro select * top n from table order by column 8. access select top n * FROM TABLE1 where 1 = 1

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.