Mysql Order by a first column and then second one [closed] - mysql

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I'd have to make a SELECT ordering by first a column and then by another column... Is it possibile?

SELECT * FROM table_name ORDER BY colum1, column2

Related

How to do custom order by in mysql [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed yesterday.
Improve this question
i have a table with different names. i can order alphabetically, but i want to order it in different way.
For example: i want 'H' to be the first set of rows in the table, then 'D', then 'A' like that. how to pass this query in mysql?

What is the alternative of a Mysql Select query using OR operator? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 days ago.
Improve this question
I have a query like:
SELECT * from table where column1=5 or column2=8
I need an alternative query to the above query. How is that possible?
I cannot guess the exact answer.

MySql : How to delete multiple rows? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
How should I delete those two rows by using user_email and note_name only?
Please help
thank you
You can use this below delete script-
delete from your_table_name where user_email = 'asdf#....' and note_name = 'adsf'
Note: This will also delete other rows if there any matching for the conditions.

Order by integer keep null in middle of positive and negative value mysql [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I have value in a column of table like-
3,2,null,4,-1,-4,-2.
I want result like
4,3,2,null,-1,-2,-4.
You want NULL treated as a zero:
order by coalesce(column, 0) desc

Complex MySQL Join [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I struggle with a MySQL Join.
These are my tables:
user(id, name,...);
aim(id, title,...);
aim2user(userID, aimID);
A user can have multiple aims.
I would like to return all aims which are NOT selectet by user X.
How is this possible?
select id from aim where id not in (select zeildID from aim2user where userID=X)