Differences between MySQL

Source: Internet
Author: User
1. this can be run in SQL Server, but in MySQL, this is the wrong string strsql = "select [f_id], [f_username], [f_content], [issecret], [f_time], [f_vidio_id] from [vidios]. [DBO]. [t_comment] Where f_states = '1 '";

2. MySQL implements the top Function
MySQL does not have the top keyword, but can use limit to achieve the top function, and can get the record between the N-M, the syntax is as follows

Select * from Table limit n, m

3. in MySQL, passing parameters and @ are all question marks.
String strsql = "select * From t_vidio where f_states =? F_states limit 0, "+ topcount. tostring ();
Mysqlconnection con = dB. getconnection ();
Mysqlcommand cmd = new mysqlcommand ();
Cmd. Parameters. Add ("? F_states ", mysqldbtype. int32). value = 1;

These problems have caused me to get tired for several hours.

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.