員工資訊表 查詢 週末寫(很簡單)

2022-06-27 14:54:14 字數 593 閱讀 9178

檔案儲存格式如下:

id,name,age,phone,job

1,alex,22,13651054608,it

2,egon,23,13304320533,tearcher

3,nezha,25,1333235322,it

現在需要對這個員工資訊檔案進行增刪改查。

基礎必做:

a.可以進行查詢,支援三種語法:

select 列名1,列名2,… where 列名條件

支援:大於小於等於,還要支援模糊查詢。

示例:select name, age where age>22

select * where job=it

select * where phone like 133

高階選做:

b.可建立新員工記錄,id要順序增加c.可刪除指定員工記錄,直接輸入員工id即可

d.修改員工資訊

語法:set 列名=「新的值」 where 條件

#先用where查詢對應人的資訊,再使用set來修改列名對應的值為「新的值」

注意:要想操作員工資訊表,必須先登入,登陸認證需要用裝飾器完成

其他需求盡量用函式實現

python查詢員工資訊表

基本要求 使用者可以模糊查詢員工資訊 顯示匹配了多少條,匹配字元需要高亮顯示 usr env python coding utf 8 import time def breakflag 用於設定標誌位 while true break flag raw input t t t是否繼續?y n if ...

員工資訊查詢

如下資料表 create tabledept emp emp noint 11 not null,dept nochar 4 not null,from datedate not null,to datedate not null,primary key emp no,dept no create ...

員工資訊表

有以下員工資訊表 staff id name agephone dept enroll date 1alex li 2213651054608 it2013 04 01 2jack wang 3013304320533 hr2015 05 03 3rain liu 251383235322 sale...