Skip to content

SQL query from C#

I am trying to query SQL Server database from C# I have class Class_A { public fetch((string name, string last_name)) { SqlConnection conn = null; double val = 0; string server = “…

Mysql queries giving error after upgrading

why this simple query not working. I know it was OK before I upgraded my mysql version. i know there are some syntax changes in new version that I done. but this is simple query no join, but not working. Please help me. EDIT: Upgraded from mysql4 to mysql5 and error is ‘syntax error’ Answer I thin…

SQL select * from column where year = 2010

This is probably a simple where clause but I want to say, from columnX (which is datetime) I want all rows where just the year = 2010. so: Answer Regarding index usage (answering Simon’s comment): if you have an index on Columnx, SQLServer WON’T use it if you use the function “year” (o…