科学网

 找回密码
  注册

tag 标签: select

相关帖子

版块 作者 回复/查看 最后发表

没有相关内容

相关日志

SQL 高级教程---SQL SELECT INTO 语句(22)
helloating1990 2016-1-12 19:25
SQL SELECT INTO 语句可用于创建表的备份复件。 SELECT INTO 语句 SELECT INTO 语句从一个表中选取数据,然后把数据插入另一个表中。 SELECT INTO 语句常用于创建表的备份复件或者用于对记录进行存档。 SQL SELECT INTO 语法 您可以把所有的列插入新表: SELECT * INTO new_table_name FROM old_tablename 或者只把希望的列插入新表: SELECT column_name(s) INTO new_table_name FROM old_tablename SQL SELECT INTO 实例 - 制作备份复件 下面的例子会制作 Persons 表的备份复件: SELECT * INTO Persons_backup FROM Persons IN 子句可用于向另一个数据库中拷贝表: SELECT * INTO Persons IN 'Backup.mdb' FROM Persons 如果我们希望拷贝某些域,可以在 SELECT 语句后列出这些域: SELECT LastName,FirstName INTO Persons_backup FROM Persons SQL SELECT INTO 实例 - 带有 WHERE 子句 我们也可以添加 WHERE 子句。 下面的例子通过从 Persons 表中提取居住在 Beijing 的人的信息,创建了一个带有两个列的名为 Persons_backup 的表: SELECT LastName,Firstname INTO Persons_backup FROM Persons WHERE City='Beijing' SQL SELECT INTO 实例 - 被连接的表 从一个以上的表中选取数据也是可以做到的。 下面的例子会创建一个名为 Persons_Order_Backup 的新表,其中包含了从 Persons 和 Orders 两个表中取得的信息: SELECT Persons.LastName,Orders.OrderNo INTO Persons_Order_Backup FROM Persons INNER JOIN Orders ON Persons.Id_P=Orders.Id_P
个人分类: 数据库|773 次阅读|0 个评论
SQL 简易教程--- SQL DISTINCT(4)
helloating1990 2015-12-29 10:02
SELECT DISTINCT 语句 去除重复值。 关键词 DISTINCT 用于返回唯一不同的值。 语法:SELECT DISTINCT 列名称 FROM 表名称 使用 DISTINCT 关键词 如果要从 Company 列中选取所有的值,我们需要使用 SELECT 语句: SELECT Company FROM OrdersOrders表: Company OrderNumber IBM 3532 W3School 2356 Apple 4698 W3School 6953 结果: Company IBM W3School Apple W3School 请注意,在结果集中,W3School 被列出了两次。 如需从 Company 列中仅选取唯一不同的值,我们需要使用 SELECT DISTINCT 语句: SELECT DISTINCT Company FROM Orders 结果: Company IBM W3School Apple 现在,在结果集中,W3School 仅被列出了一次。
个人分类: 数据库|650 次阅读|0 个评论
SQL 简易教程--- SQL select(3)
helloating1990 2015-12-28 10:38
注释: SQL 语句对大小写不敏感。 SQL SELECT 语句 SELECT 语句用于从表中选取数据,结果被存储在一个结果表中(称为结果集)。 SQL SELECT 语法SELECT 列名称 FROM 表名称 以及: SELECT * FROM 表名称 SELECT 等效于 select。 提示: 星号(*)是选取所有列的快捷方式。 SQL SELECT 实例 如需获取名为 LastName 和 FirstName 的列的内容(从名为 Persons 的数据库表),请使用类似这样的 SELECT 语句: SELECT LastName,FirstName FROM Persons Persons 表: Id LastName FirstName Address City 1 Adams John Oxford Street London 2 Bush George Fifth Avenue New York 3 Carter Thomas Changan Street Beijing 结果: LastName FirstName Adams John Bush George Carter Thomas SQL SELECT * 实例 现在我们希望从 Persons 表中选取所有的列。 请使用符号 * 取代列的名称,就像这样: SELECT * FROM Persons 结果: Id LastName FirstName Address City 1 Adams John Oxford Street London 2 Bush George Fifth Avenue New York 3 Carter Thomas Changan Street Beijing
个人分类: 数据库|866 次阅读|0 个评论
借助于pymol计算NMR中蛋白的rmsd
autodataming 2013-10-8 21:33
背景: NMR中有蛋白的多个状态,找出其中差异较大的蛋白。 有两种方法; 方法一:NMRCLUST 聚类 方法二: 首先求一个平均结构,然后计算20个构象与这个平均结构的RMSD 再取最接近平均结构的一个构象a 1wym_right_Number_0009 2.509 同时取与平均结构的rmsd最大的构象b 1wym_right_Number_0013 6.205 最后取与b的rmsd差异最大的c 1wym_right_Number_0005 9.535 我现在通过meanNMR.pl得到了平均结构 现在我借助于pymol中的fit命令来计算RMSD值 NMRrmsd.py =============================== #!/usr/bin/python #author: Chen Zhaoqiang #email: 744891290@qq.com import sys import os import re print please change the dir to the dir storing NMR pdbs\n; from pymol import cmd parameter= lenofpara= len(parameter) if(lenofpara != 5): print '''usage: NMRrmsd.py -out e:/result.txt''' path='e:/yyq/receptor/20pdbs'; #sys.exit() #outfile=sys.argv cmd.delete('all') nmrfile= #cmdline2='rms mean, '+fil #cmdline3='rms_cur mean, '+fil # print cmdline cmd.do(cmdline) #cmd.do(cmdline2) #cmd.do(cmdline3) cmd.delete('all') #notice :the result of rms and fit is the same, #rms_cur:in the nmr,maybe the result is same, #if translation a position of a protein,the rms_cur will change #Rms_Cur computes the RMS difference between two atom selections without performing any fitting =================== rmsd进行排序pymolrmsd.pl ==== #!/usr/bin/perl -w use strict; open FH,E:/yyq/selecrmsd.txt; my %hash; my ($name,$rmsd); while(FH) { if($_=~/PyMOLfit \S+, (\S+)/) { $name=$1; print $name } elsif($_=~/ Executive: RMS = (\S+)/) { $rmsd=$1; print $rmsd\n; {no strict; no warnings; # print $name, $rmsd \n; $hash{$name}=$rmsd; } } } foreach my $key (sort { $hash{$a} = $hash{$b} } keys %hash) { printf(%s\t%s\n,$key, $hash{$key}); } ============
个人分类: DrugDesign|5364 次阅读|0 个评论
Pymol 选择指定范围内的氨基酸
autodataming 2013-9-25 15:14
背景:有些蛋白没有解析出小分子(辅酶),而我们知道小分子在大分子中的位置是保守的。 这时候,我们可以通过叠合(align)操作,来添加小分子辅酶; 这时候通常会出现一些问题,辅酶和一些氨基酸发生碰撞。 你可以通过人眼观察,伤眼。 通过 选择3A 或者 2A 范围内的 氨基酸来确定哪些氨基酸发生碰撞或者距离不合理。 图形化的pymol是不能自由选择指定范围的氨基酸的。 #### 在解析的晶体结构中,我发现3A以内是有氨基酸原子的,确定最小距离2.6A 我就选择3A范围,以及2.5A范围内的氨基酸 操作: 我的辅酶是NAP select 起名字,指定要选的范围(对象) --------------------------------------------------- select NAP3A, resn NAP around 2.6 #选择离NAP2.6A范围内的原子 select NAP3Aress,byres NAP3A #选择离NAP2.6A范围内的氨基酸残基 ------------------------------------------- 要想熟练掌握命令行的pymol,我们要理解命令的意思 by====beyond 补充: Pymol 图形化操作只能选择配体4A,5A,6A等范围内的氨基酸,操作简单,但灵活性差。 around 4A 和expand 4A 的区别 around 原子的中心到目标中原子的中心的最短距离4A即可 expand考虑的原子的半径,原子表面到目标中原子的中心的最短距离4A即可 差别不是很大
个人分类: DrugDesign|28635 次阅读|0 个评论
Why anger is not a good emotion for women
热度 1 smallland 2012-2-19 20:49
Evolution tells WHY, not that what it right, what is wrong, or how you should do. In order to avoid misleading interpretation, this message is in ugly English again. Sorry, some may construe what I am saying as a judgement of daily life. No, this is only an academic analysis for those who are really interested in this topic. If a male says that "I am a very nice person except that I am easy to get angry", he may be really a nice person. What do I mean by "nice person"? It is from the point of view of "relationships", or put it clearly, a sexual partner. Then, if a female utters the same declaration, is she a "nice person"? This is the key question of this post. Behaviorally and psychologically, anger is a masculine character, it is a sign, or a tool, of dominance. How do you express your anger in front of the guy that is more dominant than you? Anger is a aggressive signal, it often relates to competition and fight, if you are not strong enough, you are not "qualified" to be angry. In fairness to the "angry female", anger is not such a bad thing, she may be more successful in commercial or political circumstances. AND, it may be good to her children, she may have a full control to her children, and can manage them well in studying, achieving good school scores. BUT, there is no school or piano in the far past when human mental essentials evolved. In millions of years of prehistory, children did not go to school, they did not play pianos. In those old days, children grew naturally in the wild, they needed their mothers care, not control. In particular, too many restrictions and control are very harmful to their psychological development, they will have less competitive advantage when they reach adult ages. From the point of view of a male, when he chooses sexual partner, he is choosing a would-be mother of his future children. This is a basic assumption of sexual select. If his partner is dominance, arrogant and quick-tempered, it is very probable that he will have a very submissive son. In this vein, it is really a problem of "sexy son". For females, "sexy son" is a good gene, but the other side of the coin is to some extent controlled by herself. Furthermore, human newborns are extremely altricial, they are born helpless, so the male should seek a SOFT and NUTRITIOUS container, the container is his wife. What is SOFT here? It is fat(are you scoffing? have a look at my book "THE UGLY PEACOCK"), it is a good temper. Dou you know what happened to Mr Liubei when he was angry? Joke;) If there is a male whose only emotion is anger, this may not be a bad thing. Many strong figures in movies is something like this. Studies show that although females may prefer happy guys, but for short-term relationship, females often prefer "angry" guys:( -------- New term starts soon, this is the end of the vacation post sequel...
3390 次阅读|2 个评论
fortran中的SELECT CASE 语法
dabing 2009-11-17 22:59
个人分类: Fortran文档|21730 次阅读|0 个评论

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-5-19 03:08

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部