Here are some examples how to use “rownum” functionality (similar to Oracle) in mysql
UPDATE mytable
SET col1 = ‘somevalue’
ORDER BY col2
LIMIT 300
rownum analog:
SELECT @rownum:=@rownum+1 rownum, mytable.*
FROM (SELECT @rownum:=0) [...]
|
||||||||
|
Here are some examples how to use “rownum” functionality (similar to Oracle) in mysql UPDATE mytable rownum analog: SELECT @rownum:=@rownum+1 rownum, mytable.* SELECT table_schema "Database", This will work in mySQL 5.0.2 and newer. Use SHOW TABLE STATUS command for [...] The following code starts the SQL from the shell script directly, without additional SQL file #!/bin/sh select ‘Hello, world!’ as test ; The detailed explanation of the trick [...] |
||||||||
|
Copyright © 2010 MemoSoup - All Rights Reserved
|
||||||||