sjis.out
上传用户:blenddy
上传日期:2007-01-07
资源大小:6495k
文件大小:4k
源码类别:

数据库系统

开发平台:

Unix_Linux

  1. QUERY: drop table 寁嶼婡梡岅;
  2. QUERY: create table 寁嶼婡梡岅 (梡岅 text, 暘椶僐乕僪 varchar, 旛峫1A偩傛 char(16));
  3. QUERY: create index 寁嶼婡梡岅index1 on 寁嶼婡梡岅 using btree (梡岅);
  4. QUERY: create index 寁嶼婡梡岅index2 on 寁嶼婡梡岅 using hash (暘椶僐乕僪);
  5. QUERY: insert into 寁嶼婡梡岅 values('僐儞僺儏乕僞僨傿僗僾儗僀','婡A01忋');
  6. QUERY: insert into 寁嶼婡梡岅 values('僐儞僺儏乕僞僌儔僼傿僢僋僗','暘B10拞');
  7. QUERY: insert into 寁嶼婡梡岅 values('僐儞僺儏乕僞僾儘僌儔儅乕','恖Z01壓');
  8. QUERY: vacuum 寁嶼婡梡岅;
  9. QUERY: select * from 寁嶼婡梡岅;
  10. 梡岅                      |暘椶僐乕僪|旛峫1a偩傛
  11. --------------------------+----------+----------
  12. 僐儞僺儏乕僞僨傿僗僾儗僀  |婡A01忋   |          
  13. 僐儞僺儏乕僞僌儔僼傿僢僋僗|暘B10拞   |          
  14. 僐儞僺儏乕僞僾儘僌儔儅乕  |恖Z01壓   |          
  15. (3 rows)
  16. QUERY: select * from 寁嶼婡梡岅 where 暘椶僐乕僪 = '恖Z01壓';
  17. 梡岅                    |暘椶僐乕僪|旛峫1a偩傛
  18. ------------------------+----------+----------
  19. 僐儞僺儏乕僞僾儘僌儔儅乕|恖Z01壓   |          
  20. (1 row)
  21. QUERY: select * from 寁嶼婡梡岅 where 暘椶僐乕僪 ~* '恖z01壓';
  22. 梡岅                    |暘椶僐乕僪|旛峫1a偩傛
  23. ------------------------+----------+----------
  24. 僐儞僺儏乕僞僾儘僌儔儅乕|恖Z01壓   |          
  25. (1 row)
  26. QUERY: select * from 寁嶼婡梡岅 where 暘椶僐乕僪 like '_Z01_';
  27. 梡岅                    |暘椶僐乕僪|旛峫1a偩傛
  28. ------------------------+----------+----------
  29. 僐儞僺儏乕僞僾儘僌儔儅乕|恖Z01壓   |          
  30. (1 row)
  31. QUERY: select * from 寁嶼婡梡岅 where 暘椶僐乕僪 like '_Z%';
  32. 梡岅                    |暘椶僐乕僪|旛峫1a偩傛
  33. ------------------------+----------+----------
  34. 僐儞僺儏乕僞僾儘僌儔儅乕|恖Z01壓   |          
  35. (1 row)
  36. QUERY: select * from 寁嶼婡梡岅 where 梡岅 ~ '僐儞僺儏乕僞[僨僌]';
  37. 梡岅                      |暘椶僐乕僪|旛峫1a偩傛
  38. --------------------------+----------+----------
  39. 僐儞僺儏乕僞僨傿僗僾儗僀  |婡A01忋   |          
  40. 僐儞僺儏乕僞僌儔僼傿僢僋僗|暘B10拞   |          
  41. (2 rows)
  42. QUERY: select * from 寁嶼婡梡岅 where 梡岅 ~* '僐儞僺儏乕僞[僨僌]';
  43. 梡岅                      |暘椶僐乕僪|旛峫1a偩傛
  44. --------------------------+----------+----------
  45. 僐儞僺儏乕僞僨傿僗僾儗僀  |婡A01忋   |          
  46. 僐儞僺儏乕僞僌儔僼傿僢僋僗|暘B10拞   |          
  47. (2 rows)
  48. QUERY: select *,character_length(梡岅) from 寁嶼婡梡岅;
  49. 梡岅                      |暘椶僐乕僪|旛峫1a偩傛|length
  50. --------------------------+----------+----------+------
  51. 僐儞僺儏乕僞僨傿僗僾儗僀  |婡A01忋   |          |    12
  52. 僐儞僺儏乕僞僌儔僼傿僢僋僗|暘B10拞   |          |    13
  53. 僐儞僺儏乕僞僾儘僌儔儅乕  |恖Z01壓   |          |    12
  54. (3 rows)
  55. QUERY: select *,octet_length(梡岅) from 寁嶼婡梡岅;
  56. 梡岅                      |暘椶僐乕僪|旛峫1a偩傛|octet_length
  57. --------------------------+----------+----------+------------
  58. 僐儞僺儏乕僞僨傿僗僾儗僀  |婡A01忋   |          |          24
  59. 僐儞僺儏乕僞僌儔僼傿僢僋僗|暘B10拞   |          |          26
  60. 僐儞僺儏乕僞僾儘僌儔儅乕  |恖Z01壓   |          |          24
  61. (3 rows)
  62. QUERY: select *,position('僨' in 梡岅) from 寁嶼婡梡岅;
  63. 梡岅                      |暘椶僐乕僪|旛峫1a偩傛|strpos
  64. --------------------------+----------+----------+------
  65. 僐儞僺儏乕僞僨傿僗僾儗僀  |婡A01忋   |          |     7
  66. 僐儞僺儏乕僞僌儔僼傿僢僋僗|暘B10拞   |          |     0
  67. 僐儞僺儏乕僞僾儘僌儔儅乕  |恖Z01壓   |          |     0
  68. (3 rows)
  69. QUERY: select *,substring(梡岅 from 10 for 4) from 寁嶼婡梡岅;
  70. 梡岅                      |暘椶僐乕僪|旛峫1a偩傛|substr  
  71. --------------------------+----------+----------+--------
  72. 僐儞僺儏乕僞僨傿僗僾儗僀  |婡A01忋   |          |僾儗僀  
  73. 僐儞僺儏乕僞僌儔僼傿僢僋僗|暘B10拞   |          |傿僢僋僗
  74. 僐儞僺儏乕僞僾儘僌儔儅乕  |恖Z01壓   |          |儔儅乕  
  75. (3 rows)
  76. QUERY: copy 寁嶼婡梡岅 to stdout;
  77. 僐儞僺儏乕僞僨傿僗僾儗僀 婡A01忋 N
  78. 僐儞僺儏乕僞僌儔僼傿僢僋僗 暘B10拞 N
  79. 僐儞僺儏乕僞僾儘僌儔儅乕 恖Z01壓 N