Skip to content

SQL Query with ORDER BY

I have a table in my SQL database that looks like: id type radius ————————- 1 type1 0.25 2 type2 0.59 3 type1 0.26 4 type1 0.78 5 type3 …

Dynamic Like Statement in SQL

I’ve been racking my brain on how to do this for a while, and i know that some genius on this site will have the answer. Basically i’m trying to do this: SELECT column FROM table WHERE [table].[…

MYSQL – count number of rows in each table

I would like to know how many rows are in each table in my database. I’ve come so far as to having However i would need to do that on each and every table – and there are a lot. What would me the best way to get a print-out with the table name and it’s row count? Answer I

GROUP BY – do not group NULL

I’m trying to figure out a way to return results by using the group by function. GROUP BY is working as expected, but my question is: Is it possible to have a group by ignoring the NULL field. So that it does not group NULLs together because I still need all the rows where the specified field is NULL. S…

SQL Comments on Create Table on SQL Server 2008

I need to create some pretty big tables in SQL Server 2008, while I do have SQL Server Management Studio, I would like to comment the tables and the columns when I create the table. How do I do this? Example of the query I am running: I’ve tried COMMENT’Expiration Date for the Adult CPR’ and…

SQL UPDATE Command

Question. I’m trying to use SQL to update a listview in C#. Using the Query Builder I can do a select, update, insert and delete. Ive got my select but I’m trying to get my update to work with no luck.( I want to use the update button on the listview to update the record) I need some insight as