Create a SQL Authenticated login first with CREATE LOGIN, then add a user associated with that login to your database by using CREATE USER. USE [master] GO CREATE LOGIN [YourUsername] WITH PASSWORD=N'YourPassword', DEFAULT_DATABASE=[YourDB], CHECK_EXPIRATION=OFF, ... Read more
Author Archives: Shiji Pan
Change MySQL table character set from latin1 to utf8
I have a table “t_user”, it’s character set is “latin1” when create it, and I want to save some unicode text at field “username”, but when I saved, the data is “????”, so I need to change character set from “latin1” to ... Read more
The DB2 equivalent for the MySQL Limit
In MySQL, you can use “Limit n,m”, like this: select * from sometable order by name limit 20,10 And in DB2, use this query: SELECT * FROM (SELECT * FROM sometable ORDER BY name DESC fetch first {start} rows only ) AS mini ORDER BY mini.name ASC fetch first {total} rows ... Read more
The SQL Server equivalent for the MySQL Limit
In MySQL, you can use “Limit n,m”, like this: select * from sometable order by name limit 20,10 And in SQL Server, use this query: SELECT * FROM ( SELECT *, ROW_NUMBER() OVER (ORDER BY name) as rowNum FROM sometable ) sub WHERE rowNum > 20 AND ... Read more
How to limit the number of rows returned by an Oracle query after ordering
In MySQL, you can use “Limit n,m”, like this: select * from sometable order by name limit 20,10 How to do in Oracle? select * from ( select a.*, ROWNUM rnum from ( <your_query_goes_here, with order by> ) a where ROWNUM <= :MAX_ROW_TO_FETCH ) where rnum >= ... Read more
Fetch the row which has the Max value for a column on Mysql
I have a MySQL table clientipstat, 3 columns: barcode, statdate, count. I want to get the latest row for each barcode(1 result per unique barcode), like ... Read more
Withdata Software Released OraLobEditor 3.5
Withdata software has announced oralobeditor 3.5, a tool that helps you edit Oracle lob(clob,blob) data directly. OraLobEditor 3.5 add PDF View, add “Execute Sql from Command line”, improve logon form, improve “Check update”, and fix bug on “Execute from command ... Read more
Withdata Software Released SqlLobEditor 2.1
Withdata software has announced sqllobeditor 2.1, a tool that helps you edit SQL Server lob(text,ntext,image) data directly. SqlLobEditor 2.1 add PDF View, add “Execute Sql from Command line”, improve logon form, improve “Check update”, and fix bug on “Execute from ... Read more
Withdata Software Released MyLobEditor 1.9
Withdata software has announced mylobeditor 1.9, a tool that helps you edit MySQL lob(text,blob) data directly. MyLobEditor 1.9 add PDF View, add “Execute Sql from Command line”, improve logon form, improve “Check update”, and fix bug on “Execute from command ... Read more
Withdata Software Released DB2LobEditor 1.7
Withdata software has announced db2lobeditor 1.7, a tool that helps you edit DB2 lob (blob, clob) data directly. DB2LobEditor 1.7 add PDF View, add “Execute Sql from Command line”, improve logon form, improve “Check update”, and fix bug on “Execute from command ... Read more