Tagged Questions
1
vote
1answer
180 views
How to write signal function in MySQL that can be called from Triggers and Stored Functions?
In my Database I have a table: Employee with recursive association, an employee can be boss of other employee.
The Table Description:
mysql> DESC Employee;
...
2
votes
1answer
235 views
query generate the information one column in two columns in one query
I have a question related with a query in sql. I have the next table:
id name
1 name1
2 country1
3 name2
4 country2
I need to call the results so:
...
1
vote
1answer
241 views
Change in datatype?
I have a table on which rows are inserted on hourly basis. The row contains id, installation, product_id and hit_allowed. all of them were mediumint in the beginning. but few days back id reached it ...
2
votes
3answers
135 views
How to get all non deleted messages from one user
I have two tables one for messages called default_messages and the other for recipients called default_recipient. This is how SQL for those table looks like:
CREATE TABLE IF NOT EXISTS ...
1
vote
1answer
926 views
What does COUNT(1) actually count? [duplicate]
Possible Duplicate:
What is the difference between select count(*) and select count(any_non_null_column)?
I have heard it commonly stated that when counting the number of rows in a query, ...
1
vote
1answer
520 views
MySQL UPDATE to replace text in LONGTEXT field
I have a WordPress table wp_posts and I'd like to run an UPDATE that will replace a url from my old domain to my new domain.
For example, let's say that one record in the field post_content has the ...
2
votes
1answer
122 views
how do I limit the characters in selected row and con-cat with '…'
I have a query which return a column named comment. I want to limit the number of characters returned by select statement to 50 and if the comment row contain more than 50 characters, I want to append ...
2
votes
2answers
118 views
How do I configure MySQL '5.1.49-1ubuntu8' to show multibyte characters?
I am using MySQL version 5.1.49 and I have now enabled UTF8 character encoding. The default character-set for MySQL is latin1. How can I change it show UTF8 characters?
Even when I query a table ...